1. 程式人生 > >segnet caffe upsample top index 0 out of range

segnet caffe upsample top index 0 out of range

I0305 15:58:08.603567 14672 solver.cpp:250] Solving VGG_ILSVRC_16_layer
I0305 15:58:08.603581 14672 solver.cpp:251] Learning Rate Policy: step
F0305 16:00:32.416029 14672 upsample_layer.cpp:127] upsample top index 0 out of range - check scale settings match input pooling layer's downsample setup
*** Check failure stack trace: ***
@ 
0x7f372f8aa5cd google::LogMessage::Fail() @ 0x7f372f8ac433 google::LogMessage::SendToLog() @ 0x7f372f8aa15b google::LogMessage::Flush() @ 0x7f372f8ace1e google::LogMessageFatal::~LogMessageFatal() @ 0x7f373010616f caffe::UpsampleLayer<>::Backward_cpu() @ 0x7f37300c8042 caffe::Net<>::BackwardFromTo() @
0x7f37300c8241 caffe::Net<>::Backward() @ 0x7f37301efc7d caffe::Solver<>::Step() @ 0x7f37301f0754 caffe::Solver<>::Solve() @ 0x408019 train() @ 0x405ce8 main @ 0x7f372ef5e830 __libc_start_main @ 0x406289 _start @ (nil) (unknown) Aborted (core dumped)

這事cpu版本的錯誤,我看到的解決方法如下:

由於這是作者自己改的caffe,而且版本比較老,所以可以做如下改動:

將upsample_layer.cpp中的第127,128行直接註釋掉:

然後

make clean
make all

也就是重新編譯caffe,因為這個cpp是caffe程式碼,所以必須重新編譯caffe才可以。