python - [Caffe]: Check failed: ShapeEquals(proto) shape mismatch (reshape not set) -


i have error , have tried take in internet got nothing clear.

i trained net caffe around 82% of accuracy.

now i'm trying try image through code:

python python/classify.py --model_def examples/imagenet/imagenet_deploy.prototxt --pretrained_model caffe_mycaffe_train_iter_10000.caffemodel --images_dim 64,64 data/mycaffe/testingset/cat1/113.png foo --mean_file data/mycaffe/mycaffe_train_mean.binaryproto

yes, images 64x64,

these last lines i'm getting:

i0610 15:33:44.868100 28657 net.cpp:194] conv3 not need backward computation. i0610 15:33:44.868110 28657 net.cpp:194] norm2 not need backward computation. i0610 15:33:44.868120 28657 net.cpp:194] pool2 not need backward computation. i0610 15:33:44.868130 28657 net.cpp:194] relu2 not need backward computation. i0610 15:33:44.868142 28657 net.cpp:194] conv2 not need backward computation. i0610 15:33:44.868152 28657 net.cpp:194] norm1 not need backward computation. i0610 15:33:44.868162 28657 net.cpp:194] pool1 not need backward computation. i0610 15:33:44.868173 28657 net.cpp:194] relu1 not need backward computation. i0610 15:33:44.868182 28657 net.cpp:194] conv1 not need backward computation. i0610 15:33:44.868192 28657 net.cpp:235] network produces output fc8_pascal i0610 15:33:44.868214 28657 net.cpp:482] collecting learning rate , weight decay. i0610 15:33:44.868238 28657 net.cpp:247] network initialization done. i0610 15:33:44.868249 28657 net.cpp:248] memory required data: 3136120 f0610 15:33:45.025965 28657 blob.cpp:458] check failed: shapeequals(proto) shape mismatch (reshape not set) * check failure stack trace: * aborted (core dumped)

i've tried not setting --mean_file , more things, shots over.

this imagenet_deploy.prototxt i've modified in parameters debug, didn't work anything.

name: "mycaffe" input: "data" input_dim: 10 input_dim: 3 input_dim: 64 input_dim: 64 layer {   name: "conv1"   type: "convolution"   bottom: "data"   top: "conv1"   convolution_param {     num_output: 64     kernel_size: 11     stride: 4   } } layer {   name: "relu1"   type: "relu"   bottom: "conv1"   top: "conv1" } layer {   name: "pool1"   type: "pooling"   bottom: "conv1"   top: "pool1"   pooling_param {     pool: max     kernel_size: 3     stride: 2   } } layer {   name: "norm1"   type: "lrn"   bottom: "pool1"   top: "norm1"   lrn_param {     local_size: 5     alpha: 0.0001     beta: 0.75   } } layer {   name: "conv2"   type: "convolution"   bottom: "norm1"   top: "conv2"   convolution_param {     num_output: 64      pad: 2     kernel_size: 5     group: 2   } } layer {   name: "relu2"   type: "relu"   bottom: "conv2"   top: "conv2" } layer {   name: "pool2"   type: "pooling"   bottom: "conv2"   top: "pool2"   pooling_param {     pool: max     kernel_size: 3     stride: 2   } } layer {   name: "norm2"   type: "lrn"   bottom: "pool2"   top: "norm2"   lrn_param {     local_size: 5     alpha: 0.0001     beta: 0.75   } } layer {   name: "conv3"   type: "convolution"   bottom: "norm2"   top: "conv3"   convolution_param {     num_output: 384     pad: 1     kernel_size: 3   } } layer {   name: "relu3"   type: "relu"   bottom: "conv3"   top: "conv3" } layer {   name: "conv4"   type: "convolution"   bottom: "conv3"   top: "conv4"   convolution_param {     num_output: 384     pad: 1     kernel_size: 3     group: 2   } } layer {   name: "relu4"   type: "relu"   bottom: "conv4"   top: "conv4" } layer {   name: "conv5"   type: "convolution"   bottom: "conv4"   top: "conv5"   convolution_param {     num_output: 64     pad: 1     kernel_size: 3     group: 2   } } layer {   name: "relu5"   type: "relu"   bottom: "conv5"   top: "conv5" } layer {   name: "pool5"   type: "pooling"   bottom: "conv5"   top: "pool5"   pooling_param {     pool: max     kernel_size: 3     stride: 2   } } layer {   name: "fc6"   type: "innerproduct"   bottom: "pool5"   top: "fc6"   inner_product_param {     num_output: 4096   } } layer {   name: "relu6"   type: "relu"   bottom: "fc6"   top: "fc6" } layer {   name: "drop6"   type: "dropout"   bottom: "fc6"   top: "fc6"   dropout_param {     dropout_ratio: 0.5   } } layer {   name: "fc7"   type: "innerproduct"   bottom: "fc6"   top: "fc7"   inner_product_param {     num_output: 4096   } } layer {   name: "relu7"   type: "relu"   bottom: "fc7"   top: "fc7" } layer {   name: "drop7"   type: "dropout"   bottom: "fc7"   top: "fc7"   dropout_param {     dropout_ratio: 0.5   } } layer {   name: "fc8_pascal"   type: "innerproduct"   bottom: "fc7"   top: "fc8_pascal"   inner_product_param {     num_output: 3   } } 

does give me clue? thank much.


the same happens c++ , classification bin provide:

f0610 18:06:14.975601 7906 blob.cpp:455] check failed: shapeequals(proto) shape mismatch (reshape not set) * check failure stack trace: * @ 0x7f0e3c50761c google::logmessage::fail() @ 0x7f0e3c507568 google::logmessage::sendtolog() @ 0x7f0e3c506f6a google::logmessage::flush() @ 0x7f0e3c509f01 google::logmessagefatal::~logmessagefatal() @ 0x7f0e3c964a80 caffe::blob<>::fromproto() @ 0x7f0e3c89576e caffe::net<>::copytrainedlayersfrom() @ 0x7f0e3c8a10d2 caffe::net<>::copytrainedlayersfrom() @ 0x406c32 classifier::classifier() @ 0x403d2b main @ 0x7f0e3b124ec5 (unknown) @ 0x4041ce (unknown) aborted (core dumped)

let me confirm whether basic steps correct.

input_dim: 10 input_dim: 3 input_dim: 64 input_dim: 64 

have tried changing first parameter 1 passing single image.

the above mentioned error occurs when dimensions of top or bottom blobs not correct. , there no go wrong other input blobs.

edit 2:

shapeequals(proto) shape mismatch (reshape not set) error message occurs when 'reshape' parameter set false fromproto function call.

i did quick search fromproto function call within library shown here. other 'copytrainedlayersfrom' function no other function set above mentioned parameter false.

this confusing. 2 methods suggest is:

  1. check whether caffe source code updated repository.
  2. try running test portion of caffe.bin executable found in /build/tools/.

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -