nvidia.dali.experimental.dynamic.permute_batch#

nvidia.dali.experimental.dynamic.permute_batch(input, /, *, batch_size=None, device=None, indices)#

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 (Tensor/Batch) – Input to the operator.

Keyword Arguments:

indices (int or list of int or Tensor/Batch 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.