Skip to content

Commit

Permalink
Update yolo.py with yaml.SafeLoader (ultralytics#1970)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anon-Artist authored Jan 18, 2021
1 parent f551e9e commit 8ca6b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, cfg='yolov5s.yaml', ch=3, nc=None): # model, input channels,
import yaml # for torch hub
self.yaml_file = Path(cfg).name
with open(cfg) as f:
self.yaml = yaml.load(f, Loader=yaml.FullLoader) # model dict
self.yaml = yaml.load(f, Loader=yaml.SafeLoader) # model dict

# Define model
ch = self.yaml['ch'] = self.yaml.get('ch', ch) # input channels
Expand Down

0 comments on commit 8ca6b9d

Please sign in to comment.