Skip to content

Instantly share code, notes, and snippets.

@abhshkdz
Last active September 8, 2015 22:25
Show Gist options
  • Save abhshkdz/d2c4f4ba24b49fc48b28 to your computer and use it in GitHub Desktop.
Save abhshkdz/d2c4f4ba24b49fc48b28 to your computer and use it in GitHub Desktop.
Plotting caffe train/test log in the terminal using gnuplot
# Make sure train/test log files exist
# `./parse_log.sh result.log` creates result.log.train and result.log.test
# `gnuplot -e "train='result.log.train'" plot_log.gnuplot` plots loss function
# `gnuplot -e "test='result.log.test'" plot_log.gnuplot` plots accuracy
reset
if (!exists("xdim")) xdim = 100
if (!exists("ydim")) ydim = 30
set terminal dumb size xdim,ydim
set style data lines
set key right
if (exists("train")) plot train using 2:3 title "loss"
if (exists("test")) plot test using 1:3 title "accuracy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment