summaryrefslogtreecommitdiff
path: root/data/unaligned_dataset.py
diff options
context:
space:
mode:
Diffstat (limited to 'data/unaligned_dataset.py')
-rw-r--r--data/unaligned_dataset.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/unaligned_dataset.py b/data/unaligned_dataset.py
index b162869..d31eb05 100644
--- a/data/unaligned_dataset.py
+++ b/data/unaligned_dataset.py
@@ -26,7 +26,7 @@ class UnalignedDataset(BaseDataset):
def __getitem__(self, index):
A_path = self.A_paths[index % self.A_size]
index_A = index % self.A_size
- index_B = random.randint(0, self.B_size)
+ index_B = random.randint(0, self.B_size - 1)
B_path = self.B_paths[index_B]
# print('(A, B) = (%d, %d)' % (index_A, index_B))
A_img = Image.open(A_path).convert('RGB')