I don’t know if that’s help but I have the same problem of torch 0.4.0and torchvision 0.2.1. I look into the transforms.py file in my Anaconda files, and the function RandomCrop is not the same than the one at Documentation 7. There is no argument fill and padding_mode. However 0.2.1 seems to be the latest version.