shlogg · Early preview
Super Kai (Kazuya Ito) @superkai_kazuya

Understanding Argmin() And Argmax() In PyTorch

argmin() and argmax() explained: get indices of min/max elements in tensors with torch or PyTorch.

Buy Me a Coffee☕
*Memos:

My post explains min() and max().
My post explains minimum() and maximum().
My post explains fmin() and fmax().
My post explains aminmax(), amin() and amax().
My post explains kthvalue() and topk().
My post explains cummin() and cummax().

argmin() can get the 0D or more D tensor of the zero or more indices of the 1st minimum elements from the 0D or more D tensor of zero or more elements as shown below:
*Memos:

argmin() can be used with torch or a tensor.
The 1st argument(input) with torch or using a tensor(Required-Type:tensor of int or float).
The 2nd argument wit...