未验证 提交 879e4614 编写于 作者: W Wei Shengyu 提交者: GitHub

Merge pull request #1273 from weisy11/develop

remove trick code
......@@ -80,10 +80,7 @@ class PKSampler(DistributedBatchSampler):
def __iter__(self):
label_per_batch = self.batch_size // self.sample_per_label
if self.shuffle:
# It's not accurate literally, but it helps in some dataset.
np.random.RandomState(self.epoch).shuffle(self.label_list)
for i in range(len(self)):
for _ in range(len(self)):
batch_index = []
batch_label_list = np.random.choice(
self.label_list,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册