powered by
Argmin
(Tensor) the input tensor.
(int) the dimension to reduce. If NULL, the argmin of the flattened input is returned.
NULL
(bool) whether the output tensor has dim retained or not. Ignored if dim=NULL.
dim
dim=NULL
Returns the indices of the minimum value of all elements in the input tensor.
input
This is the second value returned by torch_min. See its documentation for the exact semantics of this method.
torch_min
Returns the indices of the minimum values of a tensor across a dimension.
if (torch_is_installed()) { a = torch_randn(c(4, 4)) a torch_argmin(a) a = torch_randn(c(4, 4)) a torch_argmin(a, dim=1) }
Run the code above in your browser using DataLab