rowanz / r2c

Recognition to Cognition Networks (code for the model in "From Recognition to Cognition: Visual Commonsense Reasoning", CVPR 2019)
https://visualcommonsense.com
MIT License
466 stars 91 forks source link

no module named 'torchvision.layers' #37

Open Ppaddington opened 3 years ago

Ppaddington commented 3 years ago

When I run your code, there is an error 'no module named 'torchvision.layers'. and I can not use the link

pip install git+git://github.com/pytorch/vision.git@24577864e92b72f7066e1ed16e978e873e19d13d.

The solution of sudo apt-get install git-core pip install git+git://github.com/pytorch/vision.git@24577864e92b72f7066e1ed16e978e873e19d13d doesn't work.

JackWhite-rwx commented 3 years ago

hello,this is my pip: torch==1.1.0,torchvision==0.3.0

this is my code: from torchvision.ops import RoIAlign

l hope that my suggest is useful for you