RuntimeError: Expected object of scalar type Long

RuntimeError: Expected object of scalar type Long but got scalar type Int for argument #2 ‘target’ 該錯誤兩個關鍵點: 1.target 2.long 即target所使用的數據要改爲long的類型。 我是在基於pytorch做一個視覺問題,該問題出在,在定義dataloader時,所用類型需要轉換。
相關文章
相關標籤/搜索