cross_entropy_loss(): argument ‘input‘ (position 1) must be Tensor, not NoneType
yu遇到这个错误的时候,需要看看自己的网络模型
这个模型当中,在return中 return的内容 是否有异常的现象
1 或者return 多个变量
2 是否没有返回任何值
3 返回多个变量的顺序是否正确
目录
cross_entropy_loss(): argument ‘input‘ (position 1) must be Tensor, not NoneType
踩坑记录 | cross_entropy_loss(): argument 'input' (position 1) must be Tensor, not NoneType

在使用cross_entropy_loss()时遇到'argument 'input' (position 1) must be Tensor, not NoneType'错误。该错误通常由于网络模型返回值异常引起,可能是返回了None、返回多个变量或返回顺序错误。检查并确保模型return语句的正确性。"
74370187,5686716,GitLab实践:Comment管理与重要性,"['git', 'gitlab', '版本管理', '注释', '代码维护']
订阅专栏 解锁全文

1305

被折叠的 条评论
为什么被折叠?



