nvidia.dali.fn.permute_batch#
- nvidia.dali.fn.permute_batch(__input, /, *, bytes_per_sample_hint=[0], indices, preserve=False, device=None, name=None)#
Returns a batch of tensors constructed by selecting tensors from the input based on indices given in
indices
argument:out_tensor[i] = in_tensor[indices[i]]
- Supported backends
‘cpu’
‘gpu’
- Parameters:
__input¶ (TensorList) – Input to the operator.
- Keyword Arguments:
bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) –
Output size hint, in bytes per sample.
If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.
indices¶ (int or list of int or TensorList of int) –
List of indices, matching current batch size, or a batch of scalars representing indices of the tensors in the input batch.
The indices must be within
[0..batch_size)
range. Repetitions and omissions are allowed.preserve¶ (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.