parse_config.py 文件的理解:用于解析 网络配置和数据配置

parse_config.py 包含两个函数

  1. def parse_model_config(path) 用于解析网络结构文件:如:config/yolov3.cfg
  2. def parse_data_config(path) 用于解析数据集配置文件:如:config/coco.data

1. def parse_model_config(path) 函数分析

1.1. 函数的输入 是配置文件的路径 path ,如下:

  1. 函数解析的是YOLOv3 的网络结构配置文件:解析路径是如下两个之一
    PyTorch-YOLOv3/config/yolov3.cfg
    PyTorch-YOLOv3/config/yolov3-tiny.cfg

1.2. yolov3.cfg 的文件内容:

包含的所有结构有:1个 [net];75个 [convolutional];23个 [shortcut];3个 [yolo];2个 [upsample];4个 [route];一共108个结构。
1.【net】一个

[net]
# Testing
#batch=1
#subdivisions=1
# Training
batch=16
subdivisions=1
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1
  1. 【convolutional】75个
    【yolo】前面的【convolutional】的 activation=linear,且没有 batch_normalize=1 这行。
    在解析时,batch_normalize 默认设置为 0.
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
  • 4
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
make[4]: Leaving directory '/home/cxzj/bin/apps/qnx_ap/target/hypervisor/host/slm' /home/cxzj/bin/apps/qnx_ap/target/hypervisor/host/create_images.sh: 行 523: filepp: 未找到命令 /home/cxzj/bin/apps/qnx_ap/target/hypervisor/host/create_images.sh: 行 527: filepp: 未找到命令 /home/cxzj/bin/apps/qnx_ap/target/hypervisor/host/create_images.sh: 行 536: filepp: 未找到命令 Traceback (most recent call last): File "/home/cxzj/bin/apps/qnx_ap/tools/build/qcpe_config_gen.py", line 1199, in <module> xml_parse(sys.argv[1], sys.argv[2]) File "/home/cxzj/bin/apps/qnx_ap/tools/build/qcpe_config_gen.py", line 1192, in xml_parse code = generateCode(xmlFile) File "/home/cxzj/bin/apps/qnx_ap/tools/build/qcpe_config_gen.py", line 1017, in generateCode tree = ET.parse(xmlFile) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse tree.parse(source, parser) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 657, in parse self._root = parser.close() File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1671, in close self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror raise err xml.etree.ElementTree.ParseError: no element found: line 1, column 0 Couldn't create qcpe configurations Makefile:9: recipe for target 'callit' failed make[3]: *** [callit] Error 1 make[3]: Leaving directory '/home/cxzj/bin/apps/qnx_ap/target/hypervisor/host' recurse.mk:96: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/home/cxzj/bin/apps/qnx_ap/target/hypervisor' recurse.mk:96: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/cxzj/bin/apps/qnx_ap/target' Makefile:64: recipe for target 'images' failed make: *** [images] Error 2 怎么出错了
07-20

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值