|
|
|
|
|
by jiayq84
3208 days ago
|
|
Yangqing here (caffe2 and ONNX). We did use protobuf and we have an extensive discussion about its versions even, from our experience with the Caffe and Caffe2 deployment modes. Here is a snippet from the codebase: // Note [Protobuf compatibility]
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Based on experience working with downstream vendors, we generally can't
// assume recent versions of protobufs. This means that we do not use any
// protobuf features that are only available in proto3.
//
// Here are the most notable contortions we have to carry out to work around
// these limitations:
//
// - No 'map' (added protobuf 3.0). We instead represent mappings as lists
// of key-value pairs, where order does not matter and duplicates
// are not allowed. |
|
proto3 was designed to be a simplification of proto2 schemas. It removed several features such as extensions and field presence. Each .proto file specifies whether it is a proto2 or proto3 schema.
Protobuf 3.0 added several features such as maps, but these features were added to both proto2 and proto3 schemas.
Sorry this is kind of confusing.