pytorch官网给的resnet程序跑不通

问题遇到的现象和发生背景

程序跑不起来,停在0/24,

问题相关代码,请勿粘贴截图

https://github.com/miraclewkf/ImageClassification-PyTorch/blob/master/level1/train.py
中loss = criterion(outputs, labels)

运行结果及报错内容

D:\Anaconda3\python.exe "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 62455 --file D:/PycharmProjects/untitled/2.py
pydev debugger: process 3900 is connecting

Connected to pydev debugger (build 201.8538.36)
D:\Anaconda3\lib\site-packages\torchvision\transforms\transforms.py:935: UserWarning: The use of the transforms.RandomSizedCrop transform is deprecated, please use transforms.RandomResizedCrop instead.
warnings.warn("The use of the transforms.RandomSizedCrop transform is deprecated, " +
D:\Anaconda3\lib\site-packages\torchvision\transforms\transforms.py:317: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
warnings.warn("The use of the transforms.Scale transform is deprecated, " +
Epoch 0/24


D:\Anaconda3\lib\site-packages\torch\optim\lr_scheduler.py:129: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before optimizer.step(). "

Process finished with exit code -1

我的解答思路和尝试过的方法

好像是数据类型对应不上

我想要达到的结果

跑通出结果

提示不是说了吗,需要切换函数的API,你用的函数是旧版本的,需要切换到新版本去,报错提示里面也跟你说了要切换哪些什么函数了