Skip to content

Commit 84ff579

Browse files
authored
fix ImageFolder init bug with load_in_mem
1 parent 45be0dc commit 84ff579

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datasets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ def __init__(self, root, transform=None, target_transform=None,
135135
print('Loading all images into memory...')
136136
self.data, self.labels = [], []
137137
for index in tqdm(range(len(self.imgs))):
138-
path, target = self.transform(imgs[index][0]), imgs[index][1]
139-
self.data.append(self.loader(path))
138+
path, target = imgs[index][0], imgs[index][1]
139+
self.data.append(self.transform(self.loader(path)))
140140
self.labels.append(target)
141141

142142

0 commit comments

Comments
 (0)