"\n# Draw a pipeline\n\nThere is no other way to look into one model stored\nin ONNX format than looking into its node with \n*onnx*. This example demonstrates\nhow to draw a model and to retrieve it in *json*\nformat.\n\n## Retrieve a model in JSON format\n\nThat's the most simple way.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from onnxruntime.datasets import get_example\nexample1 = get_example(\"mul_1.onnx\")\n\nimport onnx\nmodel = onnx.load(example1) # model is a ModelProto protobuf message\n\nprint(model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Draw a model with ONNX\nWe use `net_drawer.py <https://github.com/onnx/onnx/blob/master/onnx/tools/net_drawer.py>`_\nincluded in *onnx* package.\nWe use *onnx* to load the model\nin a different way than before.\n\n"