- 验证是爆显存(cuda out of memory)的问题
E:python_codepytorch-best-practice-mastermain.py:138: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead. val_input = Variable(input, volatile=True) E:python_codepytorch-best-practice-mastermain.py:139: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead. val_label = Variable(label.type(t.LongTensor), volatile=True)
解决方案:
按照提示在那两行代码前加入即可。
with torch.no_grad():
Python绝大部分的报错,都可以按照提示的解决方案解决。
如缺少依赖库,直接 pip install XX 即可。
遇到问题先看报的错误,按照提示修改代码。实在不行可以百度一下相关的教程学习笔记之类的,都会有博主的解决方案,小白遇到的问题大部分网上也都能查到的。不要惊慌!!!!!
2、FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version
将错误行的([("qint8", np.int8, 1)])改成([("qint8", np.int8,(1,))])即可
3、正常运行中,突然出现了某个CV.resize()错误
有可能是因为某一张样本损坏了问题,不是bug。去查看训练数据集中,错误的那一景数据,修改或删除即可。



