train 的时候 报错
使用命令 : python wR2.py -i /root/mt/cimg/home/booy/booy/ccpd_dataset/ccpd_db/ -b 4
报错内容
/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py:100: 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
"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
Traceback (most recent call last):
File "wR2.py", line 230, in
检查了一下。是
lossAver.append(loss.data[0]) 报错了。请问是不是我的执行命令有问题
lossAver.append(loss.data[0]) ----------> lossAver.append(loss.item())
您好! 谢谢你的回复,我有时间重试一下 再次感谢
------------------ 原始邮件 ------------------ 发件人: "JpDing"<[email protected]>; 发送时间: 2019年12月12日(星期四) 下午2:59 收件人: "detectRecog/CCPD"<[email protected]>; 抄送: "黄日燕-男的"<[email protected]>;"Author"<[email protected]>; 主题: Re: [detectRecog/CCPD] train 的时候 报错 (#53)
lossAver.append(loss.data[0]) ----------> lossAver.append(loss.item())
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.