提交 9ccba793 编写于 作者: C chenguowei01

fix some

上级 0d362bb9
...@@ -85,7 +85,7 @@ class OpticDiscSeg(Dataset): ...@@ -85,7 +85,7 @@ class OpticDiscSeg(Dataset):
def __getitem__(self, idx): def __getitem__(self, idx):
print(idx) print(idx)
image_path, grt_path = self.file_list[idx] image_path, grt_path = self.file_list[idx]
return self.transform(im=image_path, label=grt_path) return self.transforms(im=image_path, label=grt_path)
def __len__(self): def __len__(self):
return len(self.file_list) return len(self.file_list)
...@@ -95,7 +95,7 @@ class DistributedBatchSampler(BatchSampler): ...@@ -95,7 +95,7 @@ class DistributedBatchSampler(BatchSampler):
indices += indices[:(self.total_size - len(indices))] indices += indices[:(self.total_size - len(indices))]
assert len(indices) == self.total_size assert len(indices) == self.total_size
if self.shuffle: if self.shuffle:
np.random.RandomState.shuffle(indices) np.random.shuffle(indices)
# subsample # subsample
def _get_indices_by_batch_size(indices): def _get_indices_by_batch_size(indices):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册