使用下面的工具得到统计结果
python parse_log.py lenetmnist.log /home(保存路径)
可以得到 lenetmnist.log.test
lenetmnist.log.train
lenetmnist.log.test内容如下
NumIters,Seconds,LearningRate,accuracy,loss
0.0,1.282026,0.00971013,0.1681,2.33668
500.0,12.791421,0.00971013,0.9713,0.087208
1000.0,24.299787,0.00937411,0.9808,0.0592562
1500.0,35.828347,0.00906403,0.9839,0.0476916
2000.0,47.347622,0.00877687,0.9855,0.0430367
2500.0,58.859498,0.00851008,0.9851,0.0448554
3000.0,70.374477,0.00826148,0.9862,0.0402984
3500.0,81.889047,0.00802918,0.9852,0.0434522
4000.0,93.404652,0.00781158,0.9891,0.0295672
4500.0,104.927278,0.00760726,0.989,0.0339895
5000.0,116.449834,0.00741498,0.9896,0.0311405
5500.0,127.969144,0.00723368,0.9899,0.0326071
6000.0,139.50722,0.0070624,0.9904,0.0285385
6500.0,151.024646,0.00690029,0.9902,0.0300033
7000.0,162.542588,0.0067466,0.99,0.0280574
7500.0,174.054227,0.00660067,0.9901,0.0311655
8000.0,185.567031,0.0064619,0.9906,0.0292851
8500.0,197.087733,0.00632975,0.9904,0.0289965
9000.0,208.599484,0.00620374,0.9909,0.0286025
9500.0,220.122434,0.00608343,0.9895,0.0347945
10000.0,231.667922,0.00596843,0.991,0.0271223
-------------------------------------------------------------
以下方法楼主不推荐,由于caffe程序中自带的py这里load的程序部分有问题。。。
caffe自带的绘制loss的工具 /mycaffe/tools/extra/plot_training_log.py.example去掉后缀可使用
使用说明:
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