Przeglądaj źródła

imap bug fix

5.0
Glenn Jocher 3 lat temu
rodzic
commit
d3e7778151
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py Wyświetl plik

@@ -477,7 +477,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
if cache_images:
gb = 0 # Gigabytes of cached images
self.img_hw0, self.img_hw = [None] * n, [None] * n
results = ThreadPool(8).imap_unordered(lambda x: load_image(*x), zip(repeat(self), range(n))) # 8 threads
results = ThreadPool(8).imap(lambda x: load_image(*x), zip(repeat(self), range(n))) # 8 threads
pbar = tqdm(enumerate(results), total=n)
for i, x in pbar:
self.imgs[i], self.img_hw0[i], self.img_hw[i] = x # img, hw_original, hw_resized = load_image(self, i)

Ładowanie…
Anuluj
Zapisz