Skip to content

Commit

Permalink
Update unpaired_dataset.py (PaddlePaddle#131)
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
bigpo authored Dec 25, 2020
1 parent 23dcd83 commit 0977227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppgan/datasets/unpaired_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def prepare_data_infos(self, dataroot):
def __getitem__(self, idx):
if self.is_train:
img_a_path = self.data_infos_a[idx % self.size_a]['path']
idx_b = random.randint(0, self.size_b)
idx_b = random.randint(0, self.size_b - 1)
img_b_path = self.data_infos_b[idx_b]['path']
datas = dict(A_path=img_a_path, B_path=img_b_path)
else:
Expand Down

0 comments on commit 0977227

Please sign in to comment.