plot accuracy + losshtml
詳情可見:http://www.2cto.com/kf/201612/575739.htmljava
1. caffe保存訓練輸出到log 並繪製accuracy loss曲線:python
以前已經編譯了matcaffe 和 pycaffe,caffe中其實已經自帶了這樣的小工具。caffe-master/tools/extra/parse_log.sh caffe-master/tools/extra/extract_seconds.py和 caffe-master/tools/extra/plot_training_log.py.example;拷貝以上文件到當前工做目錄下: 網絡
2. 保存輸出到log文件,更改腳本文件 train_caffenet.sh;在exampless/test 目錄下就會有一個log開頭的文件less
#!/usr/bin/env sh
TOOLS=./build/tools
LOG=examples/cifar10/log_results/log-
'data +%Y-%m-%d-%H-%S'
.log
$TOOLS/caffe train \
--solver=examples/cifar10/cifar10_quick_solver.prototxt -gpu all
2
>&
1
| tee $LOG
其中0表明曲線類型, save.png 表明保存的圖片名稱 caffe中支持不少種曲線繪製,經過指定不一樣的類型參數便可,具體參數以下工具
Notes: 1. Supporting multiple logs.ui
2. Log file name must end with the lower-cased ".log".spa
Supported chart types: 0: Test accuracy vs. Iterscode
1: Test accuracy vs. Secondshtm
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
畫出網絡結構圖
安裝graphviz不要用pip install安裝,不然仍是會找不到可執行程序
安裝:$ sudo apt-get insall graphviz
而後安裝pydot:$ pip install pydot
其中pyparsing會自動安裝
2. 進入 caff-root/python中,輸入便可
$ python draw_net.py --rankdir TB ../examples/cifar10/cifar10_quick_train_test.prototxt ../examples/cifar10/log_results/net.jpg