Learn R Programming

torch (version 0.2.0)

torch_flipud: Flipud

Description

Flipud

Usage

torch_flipud(self)

Arguments

self

(Tensor) Must be at least 1-dimensional.

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

Run this code
# NOT RUN {
if (torch_is_installed()) {

x <- torch_arange(start = 0, end = 4)$view(c(2, 2))
x
torch_flipud(x)
}
# }

Run the code above in your browser using DataLab