-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infra] Adjust the Caffe 1.0 code to the new Protobuf API
This commit patches the sources of Caffe 1.0 upon the download in order to resolve a compilation error coming from the changes of Protobuf's API. ONE-DCO-1.0-Signed-off-by: Tomasz Dolbniak <[email protected]>
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/caffe/util/io.cpp b/src/caffe/util/io.cpp | ||
index 5295d9dd..f71553c9 100644 | ||
--- a/src/caffe/util/io.cpp | ||
+++ b/src/caffe/util/io.cpp | ||
@@ -54,7 +54,7 @@ bool ReadProtoFromBinaryFile(const char* filename, Message* proto) { | ||
CHECK_NE(fd, -1) << "File not found: " << filename; | ||
ZeroCopyInputStream* raw_input = new FileInputStream(fd); | ||
CodedInputStream* coded_input = new CodedInputStream(raw_input); | ||
- coded_input->SetTotalBytesLimit(kProtoReadBytesLimit, 536870912); | ||
+ coded_input->SetTotalBytesLimit(kProtoReadBytesLimit); | ||
|
||
bool success = proto->ParseFromCodedStream(coded_input); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters