当前位置:   article > 正文

神经网络训练过程中出现warning,不要忽视_valueerror: using a target size (torch.size([256,

valueerror: using a target size (torch.size([256, 1])) that is different to

报错:

UserWarning: Using a target size (torch.Size([256, 1])) that is different to the input size (torch.Size([256, 1, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.

解决:

使用L1正则化的问题。

Pytorch遇到的坑:为什么模型训练时,L1loss损失无法下降?_损失降不下去_一个菜鸟的奋斗的博客-CSDN博客

参考修改后,警告消失,损失大幅下降

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/511648
推荐阅读
相关标签
  

闽ICP备14008679号