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. There is no argument fill and padding_mode. However 0.2.1 seems to be the latest version.
I’m not sure how the versions for torchvision are bumped, but I would just try to reinstall the package and check if the source matches the current documentation.