Module 'torchvision.models' has no attribute 'video'

I am using PyTorch 1.5 on Ubuntu 16.04 installed via anaconda, cuda 10.1
My model:

    model =, progress=False)
    num_features = model.fc.in_features
    model.fc = nn.Linear(num_features, num_classes)

I am getting this error:

AttributeError: module ‘torchvision.models’ has no attribute ‘video’

Can you all please help me out? Thanks!

Make sure the installed version of torchvision is >= 0.4.0.


import torchvision

if you are unsure what version is installed.

I reinstalled pytorch by creating an environment using pip and:

pip install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f

But after trying:

import torchvision

the output is:


This is strange.

I created a new environment with anaconda again and I am getting the same.

Try pip uninstall torchvision until there are no installations left. Then install it again with pip install torchvision.