如何利用caffe自带的工具包绘制accuracy/loss曲线
展开全部
需要用到的文件在 caffe/tools/extra/plot_training_log.py.example
还需要用到caffe/tools/extra/parse_log.sh 和 caffe/tools/extra/extract_seconds.py文件(如果不在当前目录执行记得都拷贝出来)
执行命令 python plot_training_log.py 0 save.png my.log
0 -为绘制类型,会有usage 提示或者查看源码 为要画那种图,有测试的、训练的accurary等等
Usage:
./plot_training_log.py chart_type[0-7] /where/to/save.png /path/to/first.log ...
Notes:
1. Supporting multiple logs.
2. Log file name must end with the lower-cased ".log".
Supported chart types:
0: Test accuracy vs. Iters
1: Test accuracy vs. Seconds
2: Test loss vs. Iters
3: Test loss vs. Seconds
4: Train learning rate vs. Iters
5: Train learning rate vs. Seconds
6: Train loss vs. Iters
7: Train loss vs. Seconds
save.png 是保存图像路径
my.log 是训练caffe定义的层输出日志路径,也就是当前要绘制曲线的数据,必须以.log结尾
eg:
>python ./plot_training_log.py 0 ~/share/learn-caffe/accuracy_iter.png ~/share/learn-caffe/lesson04/mnist_lenet.log
还需要用到caffe/tools/extra/parse_log.sh 和 caffe/tools/extra/extract_seconds.py文件(如果不在当前目录执行记得都拷贝出来)
执行命令 python plot_training_log.py 0 save.png my.log
0 -为绘制类型,会有usage 提示或者查看源码 为要画那种图,有测试的、训练的accurary等等
Usage:
./plot_training_log.py chart_type[0-7] /where/to/save.png /path/to/first.log ...
Notes:
1. Supporting multiple logs.
2. Log file name must end with the lower-cased ".log".
Supported chart types:
0: Test accuracy vs. Iters
1: Test accuracy vs. Seconds
2: Test loss vs. Iters
3: Test loss vs. Seconds
4: Train learning rate vs. Iters
5: Train learning rate vs. Seconds
6: Train loss vs. Iters
7: Train loss vs. Seconds
save.png 是保存图像路径
my.log 是训练caffe定义的层输出日志路径,也就是当前要绘制曲线的数据,必须以.log结尾
eg:
>python ./plot_training_log.py 0 ~/share/learn-caffe/accuracy_iter.png ~/share/learn-caffe/lesson04/mnist_lenet.log
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询