pytorch分布式训练(四Sampler介绍)

初步掌握pytorch分布式后(见文章1),接下来分析用到的类:python 1、DistributedSampler(Sampler) pytorch在对dataset进行Sampler时候,经过修改indics进行识别在哪一个GPU上运行,代码以下。 主要经过indices[self.rank:self.total_size:self.num_replicas]进行多GPU的index索引。w
相关文章
相关标签/搜索