Update caching (#1496)
This commit is contained in:
1 parent
89c7a5b8dc
commit
0822cda781
2 files changed
+2
-2
No files matched your search
@@ -412,7 +412,7 @@ if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--weights', type=str, default='yolov5s.pt', help='initial weights path')
|
||||
parser.add_argument('--cfg', type=str, default='', help='model.yaml path')
|
||||
parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path')
|
||||
parser.add_argument('--data', type=str, default='data/voc.yaml', help='data.yaml path')
|
||||
parser.add_argument('--hyp', type=str, default='data/hyp.scratch.yaml', help='hyperparameters path')
|
||||
parser.add_argument('--epochs', type=int, default=300)
|
||||
parser.add_argument('--batch-size', type=int, default=16, help='total batch size for all GPUs')
|
||||
|
||||
+1
-1
@@ -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): # dataset changed
|
||||
if cache['hash'] != get_hash(self.label_files + self.img_files + [cache_path]): # dataset changed
|
||||
cache = self.cache_labels(cache_path) # re-cache
|
||||
else:
|
||||
cache = self.cache_labels(cache_path) # cache
|
||||
|
||||
Reference in new issue
Block a user