引言
最近跟小伙伴设计训练了很多模型,我们主要通过看mAP
进行判断这个模型的好坏,没有将模型实际效果进行显示观察。这不,就想着写个调用的程序进行显示。
- 显示训练过程中的loss变化情况
- 显示训练过程中的lr变化情况
- 模型的inference time
- 模型效果的显示 本来想自己写,一看caffe里有类似的代码,真是太高兴了,先看看caffe是怎么做的。
Caffe Tools中的demo
caffe
caffe
可执行文件可以有不同的选项进行选择功能,功能选择是通过功能函数指针注册的方式实现的,在tools/caffe.cpp
中有,其中的注册功能部分大家有兴趣可以学习一下,这块还是很有趣的。
分析train log
在caffe/tools/extra
下有分析log的各种脚本,你可以使用gnuplot
继续绘制,也可以采用python的matplot
-
如果想提取log的关键信息,可以查看
parse_log.sh
或者parse_log.py
-
如果想绘制采用绘制
python tools/extra/plot_training_log.py 2 examples/ooxx/result/result.png jobs/ResNet/VOC0712/OOXX_321x321/ResNet_VOC0712_OOXX_321x321.log
This script mainly serves as the basis of your customizations. Customization is a must. You can copy, paste, edit them in whatever way you want. Be warned that the fields in the training log may change in the future. You had better check the data files and change the mapping from field name to field index in create_field_index before designing your own plots.
Usage:
./plot_training_log.py chart_type[0-7] /where/to/save.png /path/to/fi