KleinYuan / Caffe2-iOS

Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
MIT License
227 stars 45 forks source link

Known Issue on loading googLeNet model #7

Closed KleinYuan closed 7 years ago

KleinYuan commented 7 years ago

While trying to load googLeNet downloaded from caffe2/models, got this issue:

[libprotobuf WARNING ${path}/caffe2/third_party/protobuf/src/google/protobuf/io/coded_stream.cc:605] Reading dangerously large protocol message.  If the message turns out to be larger than 67108864 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING ${path}/caffe2/third_party/protobuf/src/google/protobuf/io/coded_stream.cc:82] The total number of bytes read was 35001128
libc++abi.dylib: terminating with uncaught exception of type caffe2::EnforceNotMet: [enforce fail at fully_connected_op.h:32] W.ndim() == 2. 4 Error from operator: 
input: "pool5/7x7_s1" input: "loss3/classifier_w" input: "loss3/classifier_b" output: "loss3/classifier" type: "FC"

I kinda doubt whether it's because of the model is not correctly translated from Caffe (issue) and therefore, I am gonna translate it again locally and see what's going on.

KleinYuan commented 7 years ago

I manually translated again and the error seems different now:

libc++abi.dylib: terminating with uncaught exception of type caffe2::EnforceNotMet: [enforce fail at fully_connected_op.h:61] K == W.size() / W.dim32(0). Dimension mismatch: X: 1 1024 4 9, W: 1000 1024, b: 1000, axis: 1, M: 1, N: 1000, K: 36864 Error from operator: 
input: "pool5/7x7_s1" input: "loss3/classifier_w" input: "loss3/classifier_b" output: "loss3/classifier" type: "FC"

Which makes more sense. Need to tune the dimension accordingly. Should work.

teaglin commented 7 years ago

Did you ever get this working?

KleinYuan commented 7 years ago

@teaglin still trying to get this work done. As long as I get this done, I will make a big push to master.

raininglixinyu commented 7 years ago

@KleinYuan hi, i met the same question with you, did you fix it ?

KleinYuan commented 7 years ago

@raininglixinyu not yet 😔

KleinYuan commented 7 years ago

@raininglixinyu
@teaglin check this out : https://github.com/KleinYuan/Caffe2-iOS/issues/13#issuecomment-301264641

KleinYuan commented 7 years ago

duplicate with This issue and seems someone got the answer. Let's move there. Close thus.

iwst121 commented 7 years ago

@KleinYuan @teaglin @raininglixinyu Did you fix this problem?I am meeting it now.Thanks.

kubytskyi commented 7 years ago

@KleinYuan @iwst121 +1, gotta same troubles

szm-R commented 7 years ago

Has anyone solved this problem?! @KleinYuan you say that this issue is a duplicate of #13 but I really can't see how! On the mentioned issue there are at least some outputs but here trying to run GoogleNet results in error: terminate called after throwing an instance of 'caffe2::EnforceNotMet' what(): [enforce fail at fully_connected_op.h:62] K == W.size() / N. Dimension mismatch: X: 1 1024 1 1, W: 1 1 1000 1024, b: 1000, axis: 1, M: 1, N: 1, K: 1024 Error from operator: input: "pool5/7x7_s1" input: "loss3/classifier_w" input: "loss3/classifier_b" output: "loss3/classifier" type: "FC" Aborted (core dumped)