index_select¶
dragon.vm.torch.
index_select
(
input,
dim,
index,
out=None
)[source]¶Select the elements along the given dimension using index.
Index should be a
int64
tensor:Continuous dimensions could also be specified to index:
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- dim (Union[int, Sequence[int]]) – The dimension to select.
- index (dragon.vm.torch.Tensor) – The index tensor.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.