Flipud
Source:R/gen-namespace-docs.R
, R/gen-namespace-examples.R
, R/gen-namespace.R
torch_flipud.Rd
Flipud
flipud(input) -> Tensor
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.
Examples
if (torch_is_installed()) {
x <- torch_arange(start = 1, end = 4)$view(c(2, 2))
x
torch_flipud(x)
}
#> torch_tensor
#> 3 4
#> 1 2
#> [ CPUFloatType{2,2} ]