torch_argmax | R Documentation |
Argmax
self |
(Tensor) the input tensor. |
dim |
(int) the dimension to reduce. If |
keepdim |
(bool) whether the output tensor has |
Returns the indices of the maximum value of all elements in the input
tensor.
This is the second value returned by torch_max
. See its
documentation for the exact semantics of this method.
Returns the indices of the maximum values of a tensor across a dimension.
This is the second value returned by torch_max
. See its
documentation for the exact semantics of this method.
if (torch_is_installed()) {
## Not run:
a = torch_randn(c(4, 4))
a
torch_argmax(a)
## End(Not run)
a = torch_randn(c(4, 4))
a
torch_argmax(a, dim=1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.