import yaml in yolo.py
This commit is contained in:
1 parent
8c43a6906d
commit
997ba7b346
1 file changed
+1
@@ -48,6 +48,7 @@ class Model(nn.Module):
|
|||||||
if type(model_cfg) is dict:
|
if type(model_cfg) is dict:
|
||||||
self.md = model_cfg # model dict
|
self.md = model_cfg # model dict
|
||||||
else: # is *.yaml
|
else: # is *.yaml
|
||||||
|
import yaml
|
||||||
with open(model_cfg) as f:
|
with open(model_cfg) as f:
|
||||||
self.md = yaml.load(f, Loader=yaml.FullLoader) # model dict
|
self.md = yaml.load(f, Loader=yaml.FullLoader) # model dict
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user