mindspore.ops.select_scatter
- mindspore.ops.select_scatter(input, src, axis, index)[source]
On the specified dimension axis of input , src is scattered into input on the specified index of input .
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> input = mindspore.ops.zeros((2, 3, 3)) >>> src = mindspore.ops.ones((2, 3)) >>> output = mindspore.ops.select_scatter(input, src, axis=1, index=1) >>> print(output) [[[0. 0. 0.] [1. 1. 1.] [0. 0. 0.]] [[0. 0. 0.] [1. 1. 1.] [0. 0. 0.]]]