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

輸出的標籤是:[1., 0., 0., 0., 0.],

提取最大值所在的 index

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

### 返回最大值的索引

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章