读取危险的大型协议消息 Caffe 警告

Reading dangerously large protocol message Caffe warning

我正在尝试针对我的问题微调全卷积网络。我收到以下警告。 为什么我会收到此警告?

     [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.

2147483647 是您可以在 C++ 中以整数数据类型存储的最大值。

Caffe 将.prototxt 文件读入缓冲区,然后从缓冲区中读取参数。此缓冲区在内部定义为最大大小为 2147483647 字节。所以如果 .prototxt 文件太大,它可能不适合这个缓冲区。因此 Caffe 发出此警告以提高限制。