nvidia.dali.fn.permute_batch#
- nvidia.dali.fn.permute_batch(__input, /, *, bytes_per_sample_hint=[0], indices, preserve=False, device=None, name=None)#
返回通过基于
indices
参数中给出的索引从输入中选择张量而构建的张量批次out_tensor[i] = in_tensor[indices[i]]
- 支持的后端
‘cpu’
‘gpu’
- 参数:
__input¶ (TensorList) – 操作符的输入。
- 关键字参数:
bytes_per_sample_hint¶ (int 或 list of int, optional, default = [0]) –
输出大小提示,以每样本字节为单位。
如果指定,则将预先分配驻留在 GPU 或分页锁定主机内存中的操作符输出,以容纳此大小的样本批次。
indices¶ (int 或 list of int 或 TensorList of int) –
索引列表,与当前批次大小匹配,或表示输入批次中张量索引的标量批次。
索引必须在
[0..batch_size)
范围内。允许重复和省略。preserve¶ (bool, optional, default = False) – 阻止操作符从图中删除,即使其输出未使用。