Kernel restart when loading model
lesnikow opened this issue · comments
Hi, calling this net = caffe.Net(model_root+'deploy.prototxt','sk506_it14k.caffemodel', caffe.TEST)
leads to this error for me:
F0813 19:57:16.217373 1316 crop_layer.cpp:68] Check failed: bottom[0]->shape(i) - crop_offset >= bottom[1]->shape(i) (2 vs. 3) invalid crop parameters in dimension: 1
*** Check failure stack trace: ***
Any ideas? Here's more context:
I0813 19:57:16.214231 1316 net.cpp:141] Setting up conv5_3
I0813 19:57:16.214290 1316 net.cpp:148] Top shape: 1 512 36 36 (663552)
I0813 19:57:16.214304 1316 net.cpp:156] Memory required for data: 895976576
I0813 19:57:16.214329 1316 layer_factory.hpp:77] Creating layer relu5_3
I0813 19:57:16.214351 1316 net.cpp:91] Creating Layer relu5_3
I0813 19:57:16.214366 1316 net.cpp:425] relu5_3 <- conv5_3
I0813 19:57:16.214390 1316 net.cpp:386] relu5_3 -> conv5_3 (in-place)
I0813 19:57:16.214411 1316 net.cpp:141] Setting up relu5_3
I0813 19:57:16.214427 1316 net.cpp:148] Top shape: 1 512 36 36 (663552)
I0813 19:57:16.214439 1316 net.cpp:156] Memory required for data: 898630784
I0813 19:57:16.214453 1316 layer_factory.hpp:77] Creating layer score-dsn-2
I0813 19:57:16.214473 1316 net.cpp:91] Creating Layer score-dsn-2
I0813 19:57:16.214488 1316 net.cpp:425] score-dsn-2 <- conv2_2_relu2_2_0_split_1
I0813 19:57:16.214516 1316 net.cpp:399] score-dsn-2 -> score-dsn2
I0813 19:57:16.215029 1316 net.cpp:141] Setting up score-dsn-2
I0813 19:57:16.215055 1316 net.cpp:148] Top shape: 1 2 284 284 (161312)
I0813 19:57:16.215068 1316 net.cpp:156] Memory required for data: 899276032
I0813 19:57:16.215088 1316 layer_factory.hpp:77] Creating layer upsample-2
I0813 19:57:16.215111 1316 net.cpp:91] Creating Layer upsample-2
I0813 19:57:16.215126 1316 net.cpp:425] upsample-2 <- score-dsn2
I0813 19:57:16.215144 1316 net.cpp:399] upsample-2 -> score-dsn2-up
I0813 19:57:16.217154 1316 net.cpp:141] Setting up upsample-2
I0813 19:57:16.217214 1316 net.cpp:148] Top shape: 1 2 570 570 (649800)
I0813 19:57:16.217231 1316 net.cpp:156] Memory required for data: 901875232
I0813 19:57:16.217257 1316 layer_factory.hpp:77] Creating layer crop
I0813 19:57:16.217289 1316 net.cpp:91] Creating Layer crop
I0813 19:57:16.217308 1316 net.cpp:425] crop <- score-dsn2-up
I0813 19:57:16.217325 1316 net.cpp:425] crop <- data_input_0_split_1
I0813 19:57:16.217344 1316 net.cpp:399] crop -> upscore-dsn2
F0813 19:57:16.217373 1316 crop_layer.cpp:68] Check failed: bottom[0]->shape(i) - crop_offset >= bottom[1]->shape(i) (2 vs. 3) invalid crop parameters in dimension: 1
*** Check failure stack trace: ***
[I 19:57:19.048 NotebookApp] KernelRestarter: restarting kernel (1/5)
Thanks!
Hi, are you using the newer version of caffe, say the official branch of caffe ?
In your error log "bottom[0]->shape(i) - crop_offset >= bottom[1]->shape(i) (2 vs. 3) invalid crop parameters in dimension: 1", I cannot find this in our version of "crop_layer.cpp line68".
Our code is based on caffe-future, its crop layer is much different from the official branch of caffe, you should use our code, rather than use our net prototxt and solver but other version of caffe.
I was using an older version. I took your suggestion and recompiled with the newest version of the official branch, and the error vanished, thanks!