So you see the class definition in the file and still get the error?
Could you just for the sake of debugging create a new (conda) environment and reinstall the latest PyTorch and torchvision versions, please?