torch_index_put: Modify values selected by 'indices'.

View source: R/gen-namespace.R

torch_index_putR Documentation

Modify values selected by indices.

Description

Modify values selected by indices.

Usage

torch_index_put(self, indices, values, accumulate = FALSE)

Arguments

self

(Tensor) Tensor that will be indexed.

indices

(List[Tensor]) List of indices. Indices are torch tensors with torch_long() dtype.

values

(Tensor) values that will be replaced the indexed location. Used for torch_index_put and torch_index_put_.

accumulate

(bool) Wether instead of replacing the current values with values, you want to add them.


torch documentation built on May 29, 2024, 9:54 a.m.