neural-network - Caffe 不会在 SIGINT 上制作快照

标签 neural-network deep-learning caffe

当我在终端中按 CTRL+C 时,caffe 会停止训练但不制作快照。如何解决?
我的求解器:

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脚本:
TOOLS=./build/tools
NET_DIR=course-work/testing

$TOOLS/caffe train \
    --solver=$NET_DIR/solver_lr0.prototxt 2>&1 | tee $NET_DIR/1.log

最佳答案

通过 tee 重定向 caffe 的输出和管道可能会改变操作系统处理和传输信号到进程的方式。尽量避免 | tee确保SIGINT到达咖啡馆。

请注意 caffe tool有两个标志

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.");

这些标志可以帮助您在 SIGINT 上定义 caffe 的行为。和 SIGHUP .

关于neural-network - Caffe 不会在 SIGINT 上制作快照,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35438160/

相关文章:

machine-learning - TensorFlow:训练好的模型存储在哪里以及如何访问?

linux - Caffe 安装,链接问题

algorithm - 比较相似的传感器信号

neural-network - 卷积神经网络/CNN 中的组

tensorflow - 如何将VGG16中的输入 channel 形状从(224, 224, 3)替换为(224, 224, 1)?

python - 在新维度中堆叠数组

c++ - 输入层类型 : ImageData in windows caffe cpp giving Blank Output

c++ - 解决类不平衡 : scaling contribution to loss and sgd

machine-learning - 如何训练纯文本段落并返回关键短语?这可能吗?

python - Keras BatchNormalization,究竟什么是样本标准化?