Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the version of pytorch-lighting and torchmetrics #58

Open
Mirage2000i opened this issue Apr 26, 2024 · 0 comments
Open

the version of pytorch-lighting and torchmetrics #58

Mirage2000i opened this issue Apr 26, 2024 · 0 comments

Comments

@Mirage2000i
Copy link

Mirage2000i commented 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

@Mirage2000i Mirage2000i changed the title the vision of pytorch-lighting and torchmetrics the version of pytorch-lighting and torchmetrics Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant