- 博客(1)
- 收藏
- 关注
原创 RuntimeError: 1only batches of spatial targets supported (non-empty 3D tensors) but got targets of s
在用自己的数据集训练unet时,碰到了这样的问题。RuntimeError: 1only batches of spatial targets supported (3D tensors) but got targets of size: : [1, 640, 959, 3]损失函数 nn.CrossEntropyLoss()的输入应该是一个4维的张量(网络的输出)和一个三维的张量(target),而读取的数据集中的标签为RGB三通道的图片 [batch size,weight,height,RGB
2022-04-13 15:09:52
7133
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人