How to add all the values in a torch tensor?

后端 未结 0 1208
清歌不尽
清歌不尽 2021-01-29 06:33

If I need to sum all the values of a 2-dimensional tensor myOnes = torch.ones([32,32]), I\'ve been doing this: torch.sum(myTensor, dim=[0,1]). For 3-d

相关标签:
回答
  • 消灭零回复
提交回复
热议问题