Skip to content

Commit 78a3530

Browse files
authored
Fixed missing quotes around write mode
1 parent d8d1b9f commit 78a3530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yolov5/gen_wts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def parse_args():
3535
model = torch.load(str(pt_file), map_location=device)['model'].float() # load to FP32
3636
model.to(device).eval()
3737

38-
with wts_file.open(mode = w+) as f:
38+
with wts_file.open(mode = "w+") as f:
3939
f.write('{}\n'.format(len(official_model.state_dict().keys())))
4040
for k, v in official_model.state_dict().items():
4141
if k in model.state_dict():

0 commit comments

Comments
 (0)