RuntimeError: 1D target tensor expected, multi-target not supported

Tag output is: [1, 0.5, 0.5, 0.5, 0.5.],

Where the maximum extraction index

 labels_ = torch.max(labels, 1)[1]    

### Back to index the maximum value

Published 234 original articles · won praise 61 · views 120 000 +

Guess you like

Origin blog.csdn.net/weixin_42528089/article/details/104836539