This commit is contained in:
Glenn Jocher 2019-05-21 16:11:08 +02:00
parent d09db54cb0
commit 520e58aa05
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
self.batch = bi # batch index of image self.batch = bi # batch index of image
# Preload images # Preload images
if cache & n < 1001: # preload all images into memory if possible if cache and (n < 1001): # preload all images into memory if possible
self.imgs = [cv2.imread(self.img_files[i]) for i in tqdm(range(n), desc='Reading images')] self.imgs = [cv2.imread(self.img_files[i]) for i in tqdm(range(n), desc='Reading images')]
# Preload labels (required for weighted CE training) # Preload labels (required for weighted CE training)