File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ def _gen_simplenet(
351
351
checkpoint_path = f"tmp/{ checkpoint_filename } "
352
352
print (f"saving in checkpoint_path:{ checkpoint_path } " )
353
353
if not os .path .exists (checkpoint_path ):
354
- os .makedirs ("tmp" )
354
+ os .makedirs ("tmp" , exist_ok = True )
355
355
download_url_to_file (url , checkpoint_path )
356
356
checkpoint = torch .load (checkpoint_path , map_location = "cpu" ,)
357
357
model .load_state_dict (checkpoint )
Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ def _gen_simplenet(
352
352
checkpoint_path = f"tmp/{ checkpoint_filename } "
353
353
print (f"saving in checkpoint_path:{ checkpoint_path } " )
354
354
if not os .path .exists (checkpoint_path ):
355
- os .makedirs ("tmp" )
355
+ os .makedirs ("tmp" , exist_ok = True )
356
356
download_url_to_file (url , checkpoint_path )
357
357
checkpoint = torch .load (checkpoint_path , map_location = "cpu" ,)
358
358
model .load_state_dict (checkpoint )
You can’t perform that action at this time.
0 commit comments