On Sun, Dec 10, 2017 at 11:23 AM, Jim Baldwin <jmbl...@gmail.com> wrote:
> Perhaps it might help if I understood the output of protoc --decode_raw.
>
> Here's an example of a .caffemodel file I'm trying to inspect.  Is there a
> description of what the numbers mean in this file?

As I said... it's a sequence of (tag, value) pairs, so...

>
> 1: "VGG_ILSVRC_16_layers"

Tag id 1: string value "VGG_bla"

> 100 {

Tag id 100: sub-message of some length (not printed here, but it's in
the encoded proto)

>   1: "input-data"

Tag id 1 of sub-message: "input-data"

(I won't annotate the rest, hopefully you get the gist of it.)

So for example, you might have a proto which is

message foo {
  string a = 1;
  repeated message bar = 100;
};

that would lead to that sort of encoding. Nowhere is type information
encoded on the wire unless you explciitly put it there yourself.
There's no way to know which proto it is, and there can be any number
of protos that would yield a valid decoding. So you have to give it
the name of the proto it is with --decode.

Protobuf is a structure encoding/decoding mechanism. Anything extra,
like type names or framing have to come from surrounding logic.

  -ilia

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to