as the title shows , it would be better to provide code.
Thanks!
You could use (assuming A
is the tensor)
idx = A.argmax()
x, y = idx//A.shape[1], idx%A.shape[1]
as the title shows , it would be better to provide code.
Thanks!
You could use (assuming A
is the tensor)
idx = A.argmax()
x, y = idx//A.shape[1], idx%A.shape[1]