Skip to content

Commit 19fef3d

Browse files
Fix error when loading the cached dataset (#8727)
Co-authored-by: Nicolas Hug <[email protected]>
1 parent 9756650 commit 19fef3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

references/video_classification/train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def main(args):
164164

165165
if args.cache_dataset and os.path.exists(cache_path):
166166
print(f"Loading dataset_train from {cache_path}")
167-
dataset, _ = torch.load(cache_path, weights_only=True)
167+
dataset, _ = torch.load(cache_path, weights_only=False)
168168
dataset.transform = transform_train
169169
else:
170170
if args.distributed:
@@ -201,7 +201,7 @@ def main(args):
201201

202202
if args.cache_dataset and os.path.exists(cache_path):
203203
print(f"Loading dataset_test from {cache_path}")
204-
dataset_test, _ = torch.load(cache_path, weights_only=True)
204+
dataset_test, _ = torch.load(cache_path, weights_only=False)
205205
dataset_test.transform = transform_test
206206
else:
207207
if args.distributed:

0 commit comments

Comments
 (0)