From 9ccba793fc1ce8374802dfb0e45d1f62a46800f6 Mon Sep 17 00:00:00 2001 From: chenguowei01 Date: Mon, 15 Jun 2020 23:01:08 +0800 Subject: [PATCH] fix some --- dygraph/datasets/optic_disc_seg.py | 2 +- dygraph/utils/distributed.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dygraph/datasets/optic_disc_seg.py b/dygraph/datasets/optic_disc_seg.py index a932ce14..258edb7f 100644 --- a/dygraph/datasets/optic_disc_seg.py +++ b/dygraph/datasets/optic_disc_seg.py @@ -85,7 +85,7 @@ class OpticDiscSeg(Dataset): def __getitem__(self, idx): print(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): return len(self.file_list) diff --git a/dygraph/utils/distributed.py b/dygraph/utils/distributed.py index b94b7834..47d0f24a 100644 --- a/dygraph/utils/distributed.py +++ b/dygraph/utils/distributed.py @@ -95,7 +95,7 @@ class DistributedBatchSampler(BatchSampler): indices += indices[:(self.total_size - len(indices))] assert len(indices) == self.total_size if self.shuffle: - np.random.RandomState.shuffle(indices) + np.random.shuffle(indices) # subsample def _get_indices_by_batch_size(indices): -- GitLab