Terminal output redirection does not work for Caffe

I want to redirect Caffe output from the terminal to a file (say output.txt ). I use the command

 caffe train -solver=expt/solver.prototxt > output.txt` 

However, the > operator does not seem to work, and Caffe spits out all the output to the terminal. I am using Ubuntu 14.04.

It is impossible to understand why > does not work with Caffe. Any help is much appreciated. Thanks.

+7
deep-learning io-redirection neural-network caffe
source share
1 answer

You need redierect stderr

 caffe train ... > output.txt 2>&1 

The redirection operator > only redirects stdout, caffe also uses sterr. You might want to set GLOG_logtosterr=1 .

+7
source share

All Articles