Closed jimmiemunyi closed 2 years ago
I solved this issue by editing the file: self-supervised/augmentation.py
I changed this line:
from kornia.augmentation import augmentation as korniatfm
to
import kornia.augmentations as korniatfm
I will try and submit a PR
Running !pip install kornia==0.5.2 fixed the issue for me.
Thanks for all your attention. We fixed the issue in https://github.com/KeremTurgutlu/self_supervised/pull/73 and had a new release https://github.com/KeremTurgutlu/self_supervised/releases/tag/v.1.0.4 which is pushed pypi repository. Now pip install self-supervised
should work without issues.
Please confirm your versions of fastai, timm, kornia, fastcore, and nbdev prior to reporting a bug
fastai - 2.5.3 timm - 0.5.4 kornia - 0.6.3 fastcore - 1.3.27 nbdev - 1.1.23
Describe the bug Cannot get past the imports, I get the error
ImportError: cannot import name 'augmentation' from 'kornia.augmentation'
I installed the package as advised, pip install self-supervised. I am actually running the tutorials on your documentation as they are in ColabTo Reproduce Steps to reproduce the behavior:
pip install -Uqq self-supervised
from self_supervised.augmentations import from self_supervised.layers import from self_supervised.vision.simclr import *
ImportError Traceback (most recent call last) in ()
----> 1 from self_supervised.augmentations import
2 from self_supervised.layers import
3 from self_supervised.vision.simclr import *
/usr/local/lib/python3.7/dist-packages/self_supervised/augmentations.py in()
6 # Cell
7 from fastai.vision.all import *
----> 8 from kornia.augmentation import augmentation as korniatfm
9 import torchvision.transforms as tvtfm
10 import kornia
ImportError: cannot import name 'augmentation' from 'kornia.augmentation' (/usr/local/lib/python3.7/dist-packages/kornia/augmentation/init.py)