pytorch: fast way to get the indices of the largest element of a matrix

后端 未结 0 596
囚心锁ツ
囚心锁ツ 2020-12-20 03:21

If I have a tensor (n*n matrix) [[1,2,3],[3,4,5],[5,6,7]], how can i get the indices of the largest element ([2,2]) using pytorch efficiently?

I tried to do t.max(mat

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