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

Reading dangerously large protocol message. #96

Closed
AlexTS1980 opened this issue Feb 8, 2017 · 1 comment
Closed

Reading dangerously large protocol message. #96

AlexTS1980 opened this issue Feb 8, 2017 · 1 comment

Comments

@AlexTS1980
Copy link

I get this message when the input is 1000x600 pixels. Sepcifically,

I0208 12:00:25.485682 1955 net.cpp:299] Memory required for data: 2580988744
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 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.

So I decided in increase the limit of the allocated memory, just to realize that 5 files in my system have this path: google/protobuf/io/coded_stream.h.

So I'm baffled: which one to change:

/home/ICTDOMAIN/453615/Downloads/opencv-3.2.0/build/modules/dnn/3rdparty/protobuf/sources/protobuf-3.1.0/src/google/protobuf/io/coded_stream.h

/usr/include/google/protobuf/io/coded_stream.h

/usr/local/lib/python2.7/dist-packages/external/protobuf/src/google/protobuf/io/coded_stream.h

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/io/coded_stream.h

/usr/local/lib/python3.4/dist-packages/external/protobuf/src/google/protobuf/io/coded_stream.h

/usr/local/lib/python3.4/dist-packages/tensorflow/include/google/protobuf/io/coded_stream.h

@sadeepj
Copy link
Collaborator

sadeepj commented Mar 13, 2017

Hi AlexTS1980,

This message complains about reading a large model (trained weights) from the .caffemodel prototxt file. It has nothing to do with the image size you're using. Usually, this is a warning message that can be ignored.

If you'd still like to get rid of the warning message, you'd have to change the correct coded_stream.h file that is used during your Caffe compilation (we cannot say exactly which one, as it depends on your Makefile configuration, environment variables etc.). Generic Caffe forums (original Caffe user group, for example) might be able to offer you better help on this.

@sadeepj sadeepj closed this as completed Mar 13, 2017
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

2 participants