-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
AttributeError: module 'torchvision' has no attribute 'datasets' #186
Comments
Hi, have you managed to fix this problem? I have the same issue here. |
I have the same problem, did you find a solution? |
I have the same problem, I had tried many versions of torchvisions, but the problem remains. Did you find a solution? |
I solved this problem, first by having the right torch, torchvision and torch audio. Then the mistake I made is to put all repos in one folder which created some sort of conflict. So make sure that apex and cocoapi are cloned in different folder than scene graph. |
Can you tell me more about how you solved it |
I solved this problem, in the file https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch/blob/master/INSTALL.md,the author wrote down this code # install PyTorch Detection
cd $INSTALL_DIR
git clone https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch.git
cd scene-graph-benchmark
# the following will install the lib with
# symbolic links, so that you can modify
# the files if you want and won't need to
# re-build it
python setup.py build develop However, I misunderstood it. I mistakenly thought that it didn't matter to the project whether or not to run the code So, if you meet the problem "AttributeError: module 'torchvision' has no attribute 'datasets'" , just don't forget to run this code Also, if you change GPU after you build this project ,you need to delete the directory By the way, I also sovled a problem I met. The problem is "ImportError: cannot import name 'amp' from 'apex' (unknown location)" , you can follow this guide https://stackoverflow.com/questions/70547501/importerror-cannot-import-name-amp-from-apex-unknown-location-jupyter-la to solve this problem I mentioned. |
Recently I have the same problem. I have tried the methods mentioned above and still cannot solve it. It seems that the codes import the wrong torchvision package: |
hi, I have met the same problem. Have you solved it? |
I did this, but the problem still happened. This made me crazy. |
I solved this problem. In this file
I modified the 'torchvision' in the 32 line to 'nmstorchvision'. |
❓ Questions and Help
hello, thank you for the great job.
when i run the command
bash train.sh Language_VG_Uniter
a problem happened below:
I dont know if the torchvision is wrong or something happened.
The text was updated successfully, but these errors were encountered: