提交 997ba7b3 authored 作者: Glenn Jocher's avatar Glenn Jocher

import yaml in yolo.py

上级 8c43a690
...@@ -48,6 +48,7 @@ class Model(nn.Module): ...@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论