Caffe: How to save training loss, training accuracy and test accuracy into .txt files?

Created on 6 Mar 2015  路  2Comments  路  Source: BVLC/caffe

Caffe just outputs these results on the screen, but I don't know how to save these results into files for further use.

Most helpful comment

The simple method is to use tee:
caffe train --solver=$solver_file 2>&1 | tee log.txt
In log.txt, you will find all the info which is the same as the screen print. The you can use grep/awk/seed to extract the loss/accuracy. Have a look at this post: http://fastml.com/how-to-run-external-programs-from-python-and-capture-their-output/

If you are working in Windows, there is wtee.exe.

All 2 comments

The simple method is to use tee:
caffe train --solver=$solver_file 2>&1 | tee log.txt
In log.txt, you will find all the info which is the same as the screen print. The you can use grep/awk/seed to extract the loss/accuracy. Have a look at this post: http://fastml.com/how-to-run-external-programs-from-python-and-capture-their-output/

If you are working in Windows, there is wtee.exe.

@ChenglongChen Thanks Chenglong锛両'm bohan, and is a phd candidate. weixin: 13840980753, maybe we can help with each other in research!

Was this page helpful?
0 / 5 - 0 ratings