我正在使用仅限CPU的Caffe实现域适应项目。它在训练过程中停留在迭代0。这就是我得到的:
I0326 18:14:51.217656 9257 net.cpp:693] Ignoring source layer concat_data
I0326 18:14:51.218354 9257 net.cpp:693] Ignoring source layer slice_features_fc7
I0326 18:14:51.218359 9257 net.cpp:693] Ignoring source layer source_features_fc7_slice_features_fc7_0_split
I0326 18:14:51.218361 9257 net.cpp:693] Ignoring source layer target_features_fc7_slice_features_fc7_1_split
I0326 18:14:51.218364 9257 net.cpp:693] Ignoring source layer source_features_fc8_fc8_source_0_split
I0326 18:14:51.218365 9257 net.cpp:693] Ignoring source layer softmax_loss
I0326 18:14:51.218366 9257 net.cpp:693] Ignoring source layer fc8_target
I0326 18:14:51.218369 9257 net.cpp:693] Ignoring source layer mmd_loss_fc7
I0326 18:14:51.218369 9257 net.cpp:693] Ignoring source layer mmd_loss_fc8
I0326 18:17:06.733678 9257 solver.cpp:407] Test net output #0: lp_accuracy = 0.0301887
I0326 18:17:34.953090 9257 solver.cpp:231] Iteration 0, loss = 4.42734
I0326 18:17:34.953160 9257 solver.cpp:247] Train net output #0: fc7_mmd_loss = 0 (* 1 = 0 loss)
I0326 18:17:34.953181 9257 solver.cpp:247] Train net output #1: fc8_mmd_loss = 0 (* 1 = 0 loss)
I0326 18:17:34.953202 9257 solver.cpp:247] Train net output #2: softmax_loss = 4.42734 (* 1 = 4.42734 loss)
I0326 18:17:34.953223 9257 sgd_solver.cpp:106] Iteration 0, lr = 0.0003
系统:Ubuntu 16.04
命令行:
./build/tools/caffe train -solver models/DAN/amazon_to_webcam/solver.prototxt -weights models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
Solver.prototxt:
net: "./models/DAN/amazon_to_webcam/train_val.prototxt"
test_iter: 795
test_interval: 300
base_lr: 0.0003
momentum: 0.9
lr_policy: "inv"
gamma: 0.002
power: 0.75
display: 100
max_iter: 50000
snapshot: 60000
snapshot_prefix: "./models/RTN/amazon_to_webcam/trained_model"
solver_mode: CPU
snapshot_after_train: false
答案 0 :(得分:0)
在迭代0处停留意味着训练正在等待成功打开的通道上的输入。 (未打开频道会产生错误信息,至少会出现超时问题。)
您需要调试输入流。如果不出意外,请放置一些调试器断点(甚至是打印语句)来检查您是否已达到流程的关键部分。
答案 1 :(得分:0)
最终,我的问题与输入流无关。仅仅CPU模式太慢而无法训练网络。因此,如果您遇到同样的问题,尝试GPU版Caffe并不会有什么坏处。问题关闭了。