Преглед на файлове

Update cache check (#3691)

Swapped order of operations for faster first per f527704cd3 (r52362419)
modifyDataloader
Glenn Jocher GitHub преди 3 години
родител
ревизия
814806c61d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py Целия файл

@@ -390,7 +390,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
cache_path = (p if p.is_file() else Path(self.label_files[0]).parent).with_suffix('.cache') # cached labels
if cache_path.is_file():
cache, exists = torch.load(cache_path), True # load
if cache['hash'] != get_hash(self.label_files + self.img_files) or cache['version'] != 0.3:
if cache['version'] != 0.3 or cache['hash'] != get_hash(self.label_files + self.img_files):
cache, exists = self.cache_labels(cache_path, prefix), False # re-cache
else:
cache, exists = self.cache_labels(cache_path, prefix), False # cache

Loading…
Отказ
Запис