mit-han-lab / temporal-shift-module

[ICCV 2019] TSM: Temporal Shift Module for Efficient Video Understanding
https://arxiv.org/abs/1811.08383
MIT License
2.05k stars 418 forks source link

module 'torchvision' has no attribute 'transforms' #205

Closed zubairahmed-ai closed 2 years ago

zubairahmed-ai commented 2 years ago

I got cuda error previously so someone suggested that I should install a lower version of torch and respective torchvision so I chose to install python 1.4 and torchvision v0.5.0 from the link but I am getting the 'transform' module missing error.

Which version of torch and torchvision have you installed?

Fritskee commented 2 years ago

Should work with those versions. Sometimes it depends whether you have installed it with pip or with conda. Also, mixing both a pip installation of torch, with a conda installation of torch, or just having an install of both pip and conda will give you issues. Maybe try to create a clean environment where you install with the command that suits you from here should solve your issues.

zubairahmed-ai commented 2 years ago

I downloaded the latest Jetpack 4.6, installed pytorch v1.8 and respective torchvision to fix this, it's working now