You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my env:python=3.6,torch=1.8.1,torchvision=0.9.1,pytorch-lightning=1.3.3,but i found the torchmetrics doesn't work,like this:
Traceback (most recent call last):
File "train.py", line 17, in
import pytorch_lightning as pl
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/init.py", line 20, in
from pytorch_lightning import metrics # noqa: E402
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/init.py", line 15, in
from pytorch_lightning.metrics.classification import ( # noqa: F401
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/classification/init.py", line 14, in
from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in
from pytorch_lightning.metrics.utils import deprecated_metrics
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/utils.py", line 22, in
from torchmetrics.utilities.data import get_num_classes as _get_num_classes
ImportError: cannot import name 'get_num_classes'
,then i change the version of torchmetrics to 0.4.1,it work,but the results are very low,
DATALOADER:0 TEST RESULTS
{'img_auc': 0.6432748538011696, 'pixel_auc': 0.3221238380546673}
i don't know why
The text was updated successfully, but these errors were encountered:
Mirage2000i
changed the title
the vision of pytorch-lighting and torchmetrics
the version of pytorch-lighting and torchmetrics
Apr 26, 2024
my env:python=3.6,torch=1.8.1,torchvision=0.9.1,pytorch-lightning=1.3.3,but i found the torchmetrics doesn't work,like this:
Traceback (most recent call last):
File "train.py", line 17, in
import pytorch_lightning as pl
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/init.py", line 20, in
from pytorch_lightning import metrics # noqa: E402
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/init.py", line 15, in
from pytorch_lightning.metrics.classification import ( # noqa: F401
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/classification/init.py", line 14, in
from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in
from pytorch_lightning.metrics.utils import deprecated_metrics
File "/home/bread/anaconda3/envs/pl/lib/python3.6/site-packages/pytorch_lightning/metrics/utils.py", line 22, in
from torchmetrics.utilities.data import get_num_classes as _get_num_classes
ImportError: cannot import name 'get_num_classes'
,then i change the version of torchmetrics to 0.4.1,it work,but the results are very low,
DATALOADER:0 TEST RESULTS
{'img_auc': 0.6432748538011696, 'pixel_auc': 0.3221238380546673}
i don't know why
The text was updated successfully, but these errors were encountered: