nvidia.dali.fn.batch_permutation#

nvidia.dali.fn.batch_permutation(*, allow_repetitions=False, bytes_per_sample_hint=[0], no_fixed_points=False, preserve=False, seed=-1, device=None, name=None)#

生成一批随机整数,可以用作批次中索引样本的索引。

支持的后端
  • ‘cpu’

关键字参数:
  • allow_repetitions (bool, optional, default = False) – 如果为 true,则输出可以包含重复和遗漏。

  • bytes_per_sample_hint (int or list of int, optional, default = [0]) –

    每个样本的输出大小提示(以字节为单位)。

    如果指定,则位于 GPU 或页锁定主机内存中的操作符输出将预先分配以容纳此大小的样本批次。

  • no_fixed_points (bool, optional, default = False) – 如果为 true,则输出置换不能包含不动点,即 out[i] != i。当批次大小为 1 时,此参数将被忽略。

  • preserve (bool, optional, default = False) – 即使操作符的输出未使用,也阻止将其从图中删除。

  • seed (int, optional, default = -1) – 随机种子;如果未设置,将自动分配一个。