shard_index

    • shard_index(input, index_num, nshards, shard_id, ignore_value=-1)[源代码]

    注意:若索引长度不能被分片数整除,则最后一个分片长度不足shard_size。

      • input (Variable)- 输入的索引
      • nshards (scalar) - 分片数量
      • shard_id (scalar) - 当前分片ID

    返回:更新后的索引值

    代码示例: