0

I am trying to run from pytorchvideo.transforms import RandAugment in Python, but it returns the following error:

ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

I can run import pytorchvideo just fine. I tried uninstalling and reinstalling both pytorchvideo and torchvision but the problem persists. Why would this happen?

1 Answer 1

2

TL;DR: Uninstall your pytorchvideo package and use the git version pip install git+https://github.com/facebookresearch/pytorchvideo. You need git installed. Or just download the repo, and run `pip install <repo_folder> locally.


Basically, the pip package is old, very old. One year ago, there was a commit to remove the import in transforms.augmentations. The module which is not found is now deprecated. The module named functional_tensor was renamed _functional_tensor to mark the depreciation.

Note from the install notice of torchvideo, there is a nightly version of the package. Although, the package is not very much "nightly" since the last update is 2 years old. It would be better to install a nightly package rather than the git package. But in my case, the build seems broken. pip is looping with some errors messages. Just note that using the repo as source might expose you to some unstabilities.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.