View source: R/gen-namespace.R
torch_flipud | R Documentation |
Flipud
torch_flipud(self)
self |
(Tensor) Must be at least 1-dimensional. |
Flip array in the up/down direction, returning a new tensor.
Flip the entries in each column in the up/down direction. Rows are preserved, but appear in a different order than before.
Equivalent to input[-1,]
. Requires the array to be at least 1-D.
if (torch_is_installed()) {
x <- torch_arange(start = 1, end = 4)$view(c(2, 2))
x
torch_flipud(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.