소스 검색

Update caching (#1496)

5.0
Glenn Jocher 3 년 전
부모
커밋
2026d4c5eb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py 파일 보기

@@ -365,7 +365,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
cache_path = Path(self.label_files[0]).parent.with_suffix('.cache') # cached labels
if cache_path.is_file():
cache = torch.load(cache_path) # load
if cache['hash'] != get_hash(self.label_files + self.img_files + [cache_path]): # dataset changed
if cache['hash'] != get_hash(self.label_files + self.img_files) or 'results' not in cache: # changed
cache = self.cache_labels(cache_path) # re-cache
else:
cache = self.cache_labels(cache_path) # cache

Loading…
취소
저장