这是由于torchvision版本过低导致,解决方法是更新torchvision最新版本。
c
pip uninstall torchvision
pip install torchvision
笔记
upgrade torchvision to the latest。