How to get google-glog output in console?

I use a structure for convolutional neural networks called caffe, and its output to the console is provided by Google-glog . However, when I try to save the output to a file using the following commands:

sh train_imagenet.sh | tee output.txt

or

sh train_imagenet.sh > output.txt

And I get the void file, and the output is not saved in the file. So I want to know how to get this conclusion. Thanks in advance.

+4
source share
2 answers

I also use Caffe. You can try

sh train_imagenet.sh 2>&1 | tee output.txt

You can also add the -i option to tee to ignore Ctrl-C (which passes the SIGINT signal to train_imagenet.sh instead of tee)

sh train_imagenet.sh 2>&1 | tee -i output.txt

BTW, glog . , stdout stderr.

, glog "/tmp/< > . < a > . < > .log. < > . <date> . <time> . <PID> " (, "/tmp/hello_world.example.com.hamaji.log.INFO.20080709-222411.10474" ).

glog ERROR FATAL (stderr) .

GLOG_log_dir log_dir ( gflags). . https://godoc.org/github.com/golang/glog.

+4

FLAGS_alsologtostderr = 1; main().

Setting Flags glog doc.

+3

Source: https://habr.com/ru/post/1547088/


All Articles