Did I miss where the documentation for the ONNX format? I am hoping to be doing some work in the R language for some neural network/deep learning and would like to help support this for that framework as well. But I am struggling to find clear documentation of how the 'saved' model objects should be stored.
Hi @cdeterman, ONNX is a protobuf format, so it's format is "self-documented" in the ONNX protobuf file: https://github.com/onnx/onnx/blob/master/onnx/onnx.proto
Please reopen this if you need more info.
Can you tell me how the network(trained or going to be trained) is stored inside an onnx file, Specifically the format in which it is going to be present inside a .onnx file type.
Hi @ezyang
Thanks for the info. If you are trying to address the problem of model persistence and exchange format for "industry" it would be really great, however, to include some form of documentation about the format itself. Or at least to have a pointer on the official website for "Documentation", let it be even containing few paragraphs about the ONNX definition in protobuf.
did you already review https://github.com/onnx/onnx/tree/master/docs, specifically https://github.com/onnx/onnx/blob/master/docs/IR.md ?
Good idea to link from main website.
You can use Google's protoc tool to dump the contents of an ONNX file, like this:
protoc --decode=onnx.ModelProto onnx.proto < mobilenetv2-1.0.onnx
In the above example:
onnx.ModelProto is the message that you want to decode.onnx.proto is the Protocol Buffer definition for Onnx (you can get one from here: https://github.com/onnx/onnx/blob/master/onnx/onnx.proto)mobilenetv2-1.0.onnx is the ONNX file that you want to examine.
Most helpful comment
Hi @cdeterman, ONNX is a protobuf format, so it's format is "self-documented" in the ONNX protobuf file: https://github.com/onnx/onnx/blob/master/onnx/onnx.proto
Please reopen this if you need more info.