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

No module named 'albumentations.torch.functional' #24

Open
rknoopsLime opened this issue Jan 9, 2019 · 4 comments
Open

No module named 'albumentations.torch.functional' #24

rknoopsLime opened this issue Jan 9, 2019 · 4 comments

Comments

@rknoopsLime
Copy link

in demo.ipynb, the line

from dataset import load_image

gives

ModuleNotFoundError: No module named 'albumentations.torch.functional'

I used conda to install albumentations, and the ipnyb command 'import albumentations.torch' loads properly. Apologies if this is an error from my side.

@EmmaSRH
Copy link

EmmaSRH commented Jan 17, 2019

in demo.ipynb, the line

from dataset import load_image

gives

ModuleNotFoundError: No module named 'albumentations.torch.functional'

I used conda to install albumentations, and the ipnyb command 'import albumentations.torch' loads properly. Apologies if this is an error from my side.

I solved it by "sudo pip3 install albumentations".

@sakares
Copy link

sakares commented Mar 23, 2019

Depends on the albementations version you have used. you may want to workaround by replacing from

from albumentations.torch.functional import img_to_tensor

to

from albumentations.pytorch.transforms import img_to_tensor

@woctezuma
Copy link

woctezuma commented Dec 11, 2020

The issue can arise because requirements.txt does not specify the version of albumentations to use:

torch==0.4.0
numpy==1.14.0
tqdm==4.19.4
albumentations

Following your remark about version, I have run pip install --upgrade albumentations, and this has solved the issue.

@headingy
Copy link

headingy commented Oct 15, 2024

albumentations = "0.5.2" would be the highest version that compiles

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

5 participants