diff options
author | Kai Li <kaili_kloud@163.com> | 2014-02-11 10:48:06 +0800 |
---|---|---|
committer | Kai Li <kaili_kloud@163.com> | 2014-02-11 11:01:35 +0800 |
commit | 8112ed98c73d614fcb0b760feab4e5d3fc3ecb85 (patch) | |
tree | 2a1627f69555cce23f295bcf9ee2a161fe17baca /scripts | |
parent | b477b0699e75fe0fc77aad15dc8df75d2f7c2bf7 (diff) | |
download | caffeonacl-8112ed98c73d614fcb0b760feab4e5d3fc3ecb85.tar.gz caffeonacl-8112ed98c73d614fcb0b760feab4e5d3fc3ecb85.tar.bz2 caffeonacl-8112ed98c73d614fcb0b760feab4e5d3fc3ecb85.zip |
Add gnuplot example to plot the training log
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/plot_log.gnuplot.example | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/scripts/plot_log.gnuplot.example b/scripts/plot_log.gnuplot.example new file mode 100644 index 00000000..c6a05d97 --- /dev/null +++ b/scripts/plot_log.gnuplot.example @@ -0,0 +1,69 @@ +# These snippets serve only as basic examples. +# 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 before designing your own plots. + +# Please generate the neccessary data files with +# /path/to/caffe/scripts/parselog.sh before plotting. +# Example usage: +# ./parselog.sh mnist.log +# Now you have mnist.log.train and mnist.log.test. +# gnuplot mnist.gnuplot + +# The fields present in the data files that are usually proper to plot along +# the y axis are test accuracy, test loss, training loss, and learning rate. +# Those should plot along the x axis are training iterations and seconds. +# Possible combinations: +# 1. Test accuracy (test score 0) vs. training iterations / time; +# 2. Test loss (test score 1) time; +# 3. Training loss vs. training iterations / time; +# 4. Learning rate vs. training iterations / time; +# A rarer one: Training time vs. iterations. + +# What is the difference between plotting against iterations and time? +# If the overhead in one iteration is too high, one algorithm might appear +# to be faster in terms of progress per iteration and slower when measured +# against time. And the reverse case is not entirely impossible. Thus, some +# papers chose to only publish the more favorable type. It is your freedom +# to decide what to plot. + +reset +set terminal png +set output "your_chart_name.png" +set style data lines +set key right + +###### Fields in the data file your_log_name.log.train are +###### Iters Seconds TrainingLoss LearningRate + +# Training loss vs. training iterations +set title "Training loss vs. training iterations" +set xlabel "Training loss" +set ylabel "Training iterations" +plot "mnist.log.train" using 1:3 title "mnist" + +# Training loss vs. training time +# plot "mnist.log.train" using 2:3 title "mnist" + +# Learning rate vs. training iterations; +# plot "mnist.log.train" using 1:4 title "mnist" + +# Learning rate vs. training time; +# plot "mnist.log.train" using 2:4 title "mnist" + + +###### Fields in the data file your_log_name.log.test are +###### Iters Seconds TestAccuracy TestLoss + +# Test loss vs. training iterations +# plot "mnist.log.test" using 1:4 title "mnist" + +# Test accuracy vs. training iterations +# plot "mnist.log.test" using 1:3 title "mnist" + +# Test loss vs. training time +# plot "mnist.log.test" using 2:4 title "mnist" + +# Test accuracy vs. training time +# plot "mnist.log.test" using 2:3 title "mnist" |