Update yolo.py with yaml.SafeLoader (#1970)

This commit is contained in:
Abhiram V authored and GitHub committed 2021-01-18 10:47:00 -08:00
1 parent 91c30e4eff
commit 4501169547
1 file changed
+1 -1
+1 -1
View File
@@ -71,7 +71,7 @@ class Model(nn.Module):
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