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 committed Jan 18, 2021
1 parent e5d19d9 commit fc697c7
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 fc697c7

Please sign in to comment.