Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminal output redirection not working for Caffe

I want to redirect Caffe's output from the terminal to a file (say output.txt). I'm using the command

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

However, the > operator doesn't seem to be working and Caffe spits out all the output on to the terminal. I'm using Ubuntu 14.04.

Can't seem to figure out why > is not working with Caffe. Any help is much appreciated. Thank you.

like image 227
Dr. Prasanna Date Avatar asked Nov 20 '15 23:11

Dr. Prasanna Date


1 Answers

You need to redierect stderr as well

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

The redirection operator > redirects only stdout, caffe is using sterr as well. You might want to set GLOG_logtosterr=1 as well.

like image 121
Shai Avatar answered Oct 17 '22 08:10

Shai