How do I fix the UserWarning: Using a target size (torch.Size([1])) that is different to the input size (torch.Size([])) is deprecated

后端 未结 0 1150
-上瘾入骨i
-上瘾入骨i 2020-12-02 02:41

When I try to run my model, I get this UserWarning. How do I go about fixing this? My model\'s input is expecting (torch.Size([])), a scalar, but my target is torch.Size([1]

相关标签:
回答
  • 消灭零回复
提交回复
热议问题