tensor.scatter_nd
fn scatter_nd(self: @Tensor<T>, updates: Tensor<T>, indices: Tensor<usize>, reduction: Option<usize>) -> Tensor<T>;Produces a copy of input data, and updates value to values specified by updates at specific index positions specified by indices.
Args
self(@Tensor<T>) - The input tensor.updates(Tensor<T>) - The updates tensor.indices(Tensor<T>) - Tensor of indices.reduction(Option<usize>) - Reduction operation. Default: reduction='none'.
Panics
Panics if index values are not within bounds [-s, s-1] along axis of size s.
Panics if indices last axis is greater than data rank.
Returns
A new Tensor<T> .
Example
Last updated
Was this helpful?