提交 595694cb 编写于 作者: H Himanshu Pandey 提交者: Francisco Massa

Replaced hard coding for shuffle variable (#438)

上级 f2513645
......@@ -37,7 +37,7 @@ class DistributedSampler(Sampler):
self.epoch = 0
self.num_samples = int(math.ceil(len(self.dataset) * 1.0 / self.num_replicas))
self.total_size = self.num_samples * self.num_replicas
self.shuffle = True
self.shuffle = shuffle
def __iter__(self):
if self.shuffle:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册