Caffe does not take pictures on SIGINT

When I press CTRL + C in the terminal, caffe stops the workout, but does not take pictures. How to fix it? My solver:

net: "course-work/testing/model.prototxt" test_iter: 200 test_interval: 500 base_lr: 0.001 momentum: 0.9 weight_decay: 0.005 lr_policy: "fixed" display: 50 max_iter: 60000 snapshot: 5000 snapshot_format: HDF5 snapshot_prefix: "course-work/testing/by_solver_lr0" snapshot_after_train: true solver_mode: CPU 

Bash script:

 TOOLS=./build/tools NET_DIR=course-work/testing $TOOLS/caffe train \ --solver=$NET_DIR/solver_lr0.prototxt 2>&1 | tee $NET_DIR/1.log 
+5
source share
2 answers

Caffe output redirection through tee , and pipes can change the way the OS works and transfers signals to processes. Try to avoid | tee | tee to make sure SIGINT reaches the coffee.

Please note that the caffe tool has two flags.

 DEFINE_string(sigint_effect, "stop", "Optional; action to take when a SIGINT signal is received: " "snapshot, stop or none."); DEFINE_string(sighup_effect, "snapshot", "Optional; action to take when a SIGHUP signal is received: " "snapshot, stop or none."); 

These flags can help you determine the behavior of caffe on SIGINT and SIGHUP .

+6
source

A good way to register coffee

 GLOG_log_dir=/path/to/log/dir $CAFFE_ROOT/bin/caffe.bin train β€”solver=/path/to/solver.prototxt 

This logging coffee outlet and SIGINT certainly reaches coffee.

+1
source

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


All Articles