View source: R/gen-namespace.R
torch_flip | R Documentation |
Flip
torch_flip(self, dims)
self |
(Tensor) the input tensor. |
dims |
(a list or tuple) axis to flip on |
Reverse the order of a n-D tensor along given axis in dims.
if (torch_is_installed()) { x <- torch_arange(1, 8)$view(c(2, 2, 2)) x torch_flip(x, c(1, 2)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.