Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target_blobs.size() == source_layer->blobs().size() (2 vs. 0) Incompatible number of blobs for layer conv2_deconv #2784

Closed
tonnyw opened this issue Jul 19, 2015 · 2 comments

Comments

@tonnyw
Copy link

tonnyw commented Jul 19, 2015

when caffe training was loading, it failed with the below message,
what does the message, 'arget_blobs.size() == source_layer->blobs().size() (2 vs. 0) Incompatible number of blobs for layer conv2_deconv', thanks.

F0718 18:58:23.310828 32014 net.cpp:657] Check failed: target_blobs.size() == source_layer->blobs().size() (2 vs. 0) Incompatible number of blobs for layer conv2_deconv
*** Check failure stack trace: ***
@ 0x7f889b339cfd google::LogMessage::Fail()
@ 0x7f889b33f0ba google::LogMessage::SendToLog()
@ 0x7f889b33bde0 google::LogMessage::Flush()
@ 0x7f889b33c0cd google::LogMessageFatal::~LogMessageFatal()
@ 0x566ab3 caffe::Net<>::ShareTrainedLayersWith()
@ 0x588a98 caffe::Solver<>::Test()
@ 0x589735 caffe::Solver<>::TestAll()
@ 0x58996e caffe::Solver<>::Step()
@ 0x58a6b4 caffe::Solver<>::Solve()
@ 0x42720f train()
@ 0x425c76 main
@ 0x7f8895efbd5d __libc_start_main
@ 0x425459 (unknown)

@seanbell
Copy link

This means that caffe was trying to copy weights from one network into another, but the two sizes don't match. For example, if you have a net for training and a net for validation, then when the solver does validation, it first copies the weights (from train to val). If the nets aren't identical in size, then the transfer won't work. Unfortunately the error message isn't very good right now. The solution is to make your two nets the same size. Note that you can drop layers between train and val, as long as the layers that are in common have compatible sizes.

@longjon
Copy link
Contributor

longjon commented Jul 23, 2015

Closing as this looks like a usage issue.

Please ask usage questions on caffe-users. If you do think there is a bug in Caffe, you're welcome to open a new issue according to https://github.com/BVLC/caffe/wiki/Reporting-Bugs-and-Other-Issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants