例如:

#!/bin/bash

 

#LOG="examples/mnist/lenet_log_mylog"

LOG="LOG/log.txt.`date +'%Y-%m-%d_%H-%M-%S'`"#包含运行日期
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"

 

./build/tools/caffe train --solver=examples/mnist/lenet_solver.prototxt

posted on 2017-06-22 17:48  想飞的萌猪  阅读(2161)  评论(0编辑  收藏  举报