Learn R Programming

torch (version 0.0.2)

torch_cummin: Cummin

Description

Cummin

Arguments

input

(Tensor) the input tensor.

dim

(int) the dimension to do the operation over

out

(tuple, optional) the result tuple of two output tensors (values, indices)

cummin(input, dim, out=None) -> (Tensor, LongTensor)

Returns a namedtuple (values, indices) where values is the cumulative minimum of elements of input in the dimension dim. And indices is the index location of each maximum value found in the dimension dim.

$$ y_i = min(x_1, x_2, x_3, \dots, x_i) $$

Examples

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

a = torch_randn(c(10))
a
torch_cummin(a, dim=1)
}
# }

Run the code above in your browser using DataLab