How to cast a 1-d IntTensor to int in Pytorch

后端 未结 3 1220
独厮守ぢ
独厮守ぢ 2021-02-13 11:46

I get a 1-D IntTensor,but i want to convert it to a integer. I try it by this method:

print(dictionary[IntTensor.int()])

but got an error:

3条回答
提交回复
热议问题