Repository: kserve/kserve

Issue:
Support for ONNX as a first class framework
/kind feature

**Describe the solution you'd like**
Allow users to use ONNX models in KFServing


**Anything else you would like to add:**
TensorRT appears to be adding support for ONNX too... so its possible that we may be able to use the TensorRT inference server for this. Ref: https://github.com/NVIDIA/tensorrt-inference-server/issues/293



Discussion:
/assign rakelkar
#134 
/area frameworks

Resolving patch:
diff --git a/docs/samples/onnx/assets/onnx_ml_pb2.py b/docs/samples/onnx/assets/onnx_ml_pb2.py
new file mode 100644
--- /dev/null
+++ b/docs/samples/onnx/assets/onnx_ml_pb2.py
@@ -0,0 +1,1581 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: onnx-ml.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='onnx-ml.proto',
+  package='onnx',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\ronnx-ml.proto\x12\x04onnx\"\xe0\x03\n\x0e\x41ttributeProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rref_attr_name\x18\x15 \x01(\t\x12\x12\n\ndoc_string\x18\r \x01(\t\x12\x30\n\x04type\x18\x14 \x01(\x0e\x32\".onnx.AttributeProto.AttributeType\x12\t\n\x01\x66\x18\x02 \x01(\x02\x12\t\n\x01i\x18\x03 \x01(\x03\x12\t\n\x01s\x18\x04 \x01(\x0c\x12\x1c\n\x01t\x18\x05 \x01(\x0b\x32\x11.onnx.TensorProto\x12\x1b\n\x01g\x18\x06 \x01(\x0b\x32\x10.onnx.GraphProto\x12\x0e\n\x06\x66loats\x18\x07 \x03(\x02\x12\x0c\n\x04ints\x18\x08 \x03(\x03\x12\x0f\n\x07strings\x18\t \x03(\x0c\x12\"\n\x07tensors\x18\n \x03(\x0b\x32\x11.onnx.TensorProto\x12 \n\x06graphs\x18\x0b \x03(\x0b\x32\x10.onnx.GraphProto\"\x91\x01\n\rAttributeType\x12\r\n\tUNDEFINED\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\x07\n\x03INT\x10\x02\x12\n\n\x06STRING\x10\x03\x12\n\n\x06TENSOR\x10\x04\x12\t\n\x05GRAPH\x10\x05\x12\n\n\x06\x46LOATS\x10\x06\x12\x08\n\x04INTS\x10\x07\x12\x0b\n\x07STRINGS\x10\x08\x12\x0b\n\x07TENSORS\x10\t\x12\n\n\x06GRAPHS\x10\n\"Q\n\x0eValueInfoProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1d\n\x04type\x18\x02 \x01(\x0b\x32\x0f.onnx.TypeProto\x12\x12\n\ndoc_string\x18\x03 \x01(\t\"\x96\x01\n\tNodeProto\x12\r\n\x05input\x18\x01 \x03(\t\x12\x0e\n\x06output\x18\x02 \x03(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07op_type\x18\x04 \x01(\t\x12\x0e\n\x06\x64omain\x18\x07 \x01(\t\x12\'\n\tattribute\x18\x05 \x03(\x0b\x32\x14.onnx.AttributeProto\x12\x12\n\ndoc_string\x18\x06 \x01(\t\"\xbb\x02\n\nModelProto\x12\x12\n\nir_version\x18\x01 \x01(\x03\x12.\n\x0copset_import\x18\x08 \x03(\x0b\x32\x18.onnx.OperatorSetIdProto\x12\x15\n\rproducer_name\x18\x02 \x01(\t\x12\x18\n\x10producer_version\x18\x03 \x01(\t\x12\x0e\n\x06\x64omain\x18\x04 \x01(\t\x12\x15\n\rmodel_version\x18\x05 \x01(\x03\x12\x12\n\ndoc_string\x18\x06 \x01(\t\x12\x1f\n\x05graph\x18\x07 \x01(\x0b\x32\x10.onnx.GraphProto\x12&\n\tfunctions\x18\x64 \x03(\x0b\x32\x13.onnx.FunctionProto\x12\x34\n\x0emetadata_props\x18\x0e \x03(\x0b\x32\x1c.onnx.StringStringEntryProto\"4\n\x16StringStringEntryProto\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"k\n\x10TensorAnnotation\x12\x13\n\x0btensor_name\x18\x01 \x01(\t\x12\x42\n\x1cquant_parameter_tensor_names\x18\x02 \x03(\x0b\x32\x1c.onnx.StringStringEntryProto\"\xa3\x02\n\nGraphProto\x12\x1d\n\x04node\x18\x01 \x03(\x0b\x32\x0f.onnx.NodeProto\x12\x0c\n\x04name\x18\x02 \x01(\t\x12&\n\x0binitializer\x18\x05 \x03(\x0b\x32\x11.onnx.TensorProto\x12\x12\n\ndoc_string\x18\n \x01(\t\x12#\n\x05input\x18\x0b \x03(\x0b\x32\x14.onnx.ValueInfoProto\x12$\n\x06output\x18\x0c \x03(\x0b\x32\x14.onnx.ValueInfoProto\x12(\n\nvalue_info\x18\r \x03(\x0b\x32\x14.onnx.ValueInfoProto\x12\x37\n\x17quantization_annotation\x18\x0e \x03(\x0b\x32\x16.onnx.TensorAnnotation\"\xb8\x05\n\x0bTensorProto\x12\x0c\n\x04\x64ims\x18\x01 \x03(\x03\x12\x11\n\tdata_type\x18\x02 \x01(\x05\x12*\n\x07segment\x18\x03 \x01(\x0b\x32\x19.onnx.TensorProto.Segment\x12\x16\n\nfloat_data\x18\x04 \x03(\x02\x42\x02\x10\x01\x12\x16\n\nint32_data\x18\x05 \x03(\x05\x42\x02\x10\x01\x12\x13\n\x0bstring_data\x18\x06 \x03(\x0c\x12\x16\n\nint64_data\x18\x07 \x03(\x03\x42\x02\x10\x01\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x12\n\ndoc_string\x18\x0c \x01(\t\x12\x10\n\x08raw_data\x18\t \x01(\x0c\x12\x33\n\rexternal_data\x18\r \x03(\x0b\x32\x1c.onnx.StringStringEntryProto\x12\x35\n\rdata_location\x18\x0e \x01(\x0e\x32\x1e.onnx.TensorProto.DataLocation\x12\x17\n\x0b\x64ouble_data\x18\n \x03(\x01\x42\x02\x10\x01\x12\x17\n\x0buint64_data\x18\x0b \x03(\x04\x42\x02\x10\x01\x1a%\n\x07Segment\x12\r\n\x05\x62\x65gin\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xda\x01\n\x08\x44\x61taType\x12\r\n\tUNDEFINED\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\t\n\x05UINT8\x10\x02\x12\x08\n\x04INT8\x10\x03\x12\n\n\x06UINT16\x10\x04\x12\t\n\x05INT16\x10\x05\x12\t\n\x05INT32\x10\x06\x12\t\n\x05INT64\x10\x07\x12\n\n\x06STRING\x10\x08\x12\x08\n\x04\x42OOL\x10\t\x12\x0b\n\x07\x46LOAT16\x10\n\x12\n\n\x06\x44OUBLE\x10\x0b\x12\n\n\x06UINT32\x10\x0c\x12\n\n\x06UINT64\x10\r\x12\r\n\tCOMPLEX64\x10\x0e\x12\x0e\n\nCOMPLEX128\x10\x0f\x12\x0c\n\x08\x42\x46LOAT16\x10\x10\")\n\x0c\x44\x61taLocation\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08\x45XTERNAL\x10\x01\"\x95\x01\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x01 \x03(\x0b\x32 .onnx.TensorShapeProto.Dimension\x1aR\n\tDimension\x12\x13\n\tdim_value\x18\x01 \x01(\x03H\x00\x12\x13\n\tdim_param\x18\x02 \x01(\tH\x00\x12\x12\n\ndenotation\x18\x03 \x01(\tB\x07\n\x05value\"\xc2\x04\n\tTypeProto\x12-\n\x0btensor_type\x18\x01 \x01(\x0b\x32\x16.onnx.TypeProto.TensorH\x00\x12\x31\n\rsequence_type\x18\x04 \x01(\x0b\x32\x18.onnx.TypeProto.SequenceH\x00\x12\'\n\x08map_type\x18\x05 \x01(\x0b\x32\x13.onnx.TypeProto.MapH\x00\x12-\n\x0bopaque_type\x18\x07 \x01(\x0b\x32\x16.onnx.TypeProto.OpaqueH\x00\x12:\n\x12sparse_tensor_type\x18\x08 \x01(\x0b\x32\x1c.onnx.TypeProto.SparseTensorH\x00\x12\x12\n\ndenotation\x18\x06 \x01(\t\x1a\x42\n\x06Tensor\x12\x11\n\telem_type\x18\x01 \x01(\x05\x12%\n\x05shape\x18\x02 \x01(\x0b\x32\x16.onnx.TensorShapeProto\x1a.\n\x08Sequence\x12\"\n\telem_type\x18\x01 \x01(\x0b\x32\x0f.onnx.TypeProto\x1a<\n\x03Map\x12\x10\n\x08key_type\x18\x01 \x01(\x05\x12#\n\nvalue_type\x18\x02 \x01(\x0b\x32\x0f.onnx.TypeProto\x1a&\n\x06Opaque\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1aH\n\x0cSparseTensor\x12\x11\n\telem_type\x18\x01 \x01(\x05\x12%\n\x05shape\x18\x02 \x01(\x0b\x32\x16.onnx.TensorShapeProtoB\x07\n\x05value\"5\n\x12OperatorSetIdProto\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\"\xbf\x01\n\rFunctionProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rsince_version\x18\x02 \x01(\x03\x12$\n\x06status\x18\x03 \x01(\x0e\x32\x14.onnx.OperatorStatus\x12\r\n\x05input\x18\x04 \x03(\t\x12\x0e\n\x06output\x18\x05 \x03(\t\x12\x11\n\tattribute\x18\x06 \x03(\t\x12\x1d\n\x04node\x18\x07 \x03(\x0b\x32\x0f.onnx.NodeProto\x12\x12\n\ndoc_string\x18\x08 \x01(\t*\x97\x01\n\x07Version\x12\x12\n\x0e_START_VERSION\x10\x00\x12\x19\n\x15IR_VERSION_2017_10_10\x10\x01\x12\x19\n\x15IR_VERSION_2017_10_30\x10\x02\x12\x18\n\x14IR_VERSION_2017_11_3\x10\x03\x12\x18\n\x14IR_VERSION_2019_1_22\x10\x04\x12\x0e\n\nIR_VERSION\x10\x05*.\n\x0eOperatorStatus\x12\x10\n\x0c\x45XPERIMENTAL\x10\x00\x12\n\n\x06STABLE\x10\x01\x62\x06proto3')
+)
+
+_VERSION = _descriptor.EnumDescriptor(
+  name='Version',
+  full_name='onnx.Version',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='_START_VERSION', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='IR_VERSION_2017_10_10', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='IR_VERSION_2017_10_30', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='IR_VERSION_2017_11_3', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='IR_VERSION_2019_1_22', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='IR_VERSION', index=5, number=5,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3199,
+  serialized_end=3350,
+)
+_sym_db.RegisterEnumDescriptor(_VERSION)
+
+Version = enum_type_wrapper.EnumTypeWrapper(_VERSION)
+_OPERATORSTATUS = _descriptor.EnumDescriptor(
+  name='OperatorStatus',
+  full_name='onnx.OperatorStatus',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='EXPERIMENTAL', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STABLE', index=1, number=1,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3352,
+  serialized_end=3398,
+)
+_sym_db.RegisterEnumDescriptor(_OPERATORSTATUS)
+
+OperatorStatus = enum_type_wrapper.EnumTypeWrapper(_OPERATORSTATUS)
+_START_VERSION = 0
+IR_VERSION_2017_10_10 = 1
+IR_VERSION_2017_10_30 = 2
+IR_VERSION_2017_11_3 = 3
+IR_VERSION_2019_1_22 = 4
+IR_VERSION = 5
+EXPERIMENTAL = 0
+STABLE = 1
+
+
+_ATTRIBUTEPROTO_ATTRIBUTETYPE = _descriptor.EnumDescriptor(
+  name='AttributeType',
+  full_name='onnx.AttributeProto.AttributeType',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='UNDEFINED', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='FLOAT', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STRING', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='TENSOR', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='GRAPH', index=5, number=5,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='FLOATS', index=6, number=6,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INTS', index=7, number=7,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STRINGS', index=8, number=8,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='TENSORS', index=9, number=9,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='GRAPHS', index=10, number=10,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=359,
+  serialized_end=504,
+)
+_sym_db.RegisterEnumDescriptor(_ATTRIBUTEPROTO_ATTRIBUTETYPE)
+
+_TENSORPROTO_DATATYPE = _descriptor.EnumDescriptor(
+  name='DataType',
+  full_name='onnx.TensorProto.DataType',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='UNDEFINED', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='FLOAT', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='UINT8', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT8', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='UINT16', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT16', index=5, number=5,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT32', index=6, number=6,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT64', index=7, number=7,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STRING', index=8, number=8,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='BOOL', index=9, number=9,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='FLOAT16', index=10, number=10,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='DOUBLE', index=11, number=11,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='UINT32', index=12, number=12,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='UINT64', index=13, number=13,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='COMPLEX64', index=14, number=14,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='COMPLEX128', index=15, number=15,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='BFLOAT16', index=16, number=16,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=1953,
+  serialized_end=2171,
+)
+_sym_db.RegisterEnumDescriptor(_TENSORPROTO_DATATYPE)
+
+_TENSORPROTO_DATALOCATION = _descriptor.EnumDescriptor(
+  name='DataLocation',
+  full_name='onnx.TensorProto.DataLocation',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='DEFAULT', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='EXTERNAL', index=1, number=1,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2173,
+  serialized_end=2214,
+)
+_sym_db.RegisterEnumDescriptor(_TENSORPROTO_DATALOCATION)
+
+
+_ATTRIBUTEPROTO = _descriptor.Descriptor(
+  name='AttributeProto',
+  full_name='onnx.AttributeProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.AttributeProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='ref_attr_name', full_name='onnx.AttributeProto.ref_attr_name', index=1,
+      number=21, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.AttributeProto.doc_string', index=2,
+      number=13, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='onnx.AttributeProto.type', index=3,
+      number=20, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='f', full_name='onnx.AttributeProto.f', index=4,
+      number=2, type=2, cpp_type=6, label=1,
+      has_default_value=False, default_value=float(0),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='i', full_name='onnx.AttributeProto.i', index=5,
+      number=3, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='s', full_name='onnx.AttributeProto.s', index=6,
+      number=4, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b(""),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='t', full_name='onnx.AttributeProto.t', index=7,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='g', full_name='onnx.AttributeProto.g', index=8,
+      number=6, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='floats', full_name='onnx.AttributeProto.floats', index=9,
+      number=7, type=2, cpp_type=6, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='ints', full_name='onnx.AttributeProto.ints', index=10,
+      number=8, type=3, cpp_type=2, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='strings', full_name='onnx.AttributeProto.strings', index=11,
+      number=9, type=12, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='tensors', full_name='onnx.AttributeProto.tensors', index=12,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='graphs', full_name='onnx.AttributeProto.graphs', index=13,
+      number=11, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _ATTRIBUTEPROTO_ATTRIBUTETYPE,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=24,
+  serialized_end=504,
+)
+
+
+_VALUEINFOPROTO = _descriptor.Descriptor(
+  name='ValueInfoProto',
+  full_name='onnx.ValueInfoProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.ValueInfoProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='onnx.ValueInfoProto.type', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.ValueInfoProto.doc_string', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=506,
+  serialized_end=587,
+)
+
+
+_NODEPROTO = _descriptor.Descriptor(
+  name='NodeProto',
+  full_name='onnx.NodeProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='input', full_name='onnx.NodeProto.input', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='output', full_name='onnx.NodeProto.output', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.NodeProto.name', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='op_type', full_name='onnx.NodeProto.op_type', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='domain', full_name='onnx.NodeProto.domain', index=4,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='attribute', full_name='onnx.NodeProto.attribute', index=5,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.NodeProto.doc_string', index=6,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=590,
+  serialized_end=740,
+)
+
+
+_MODELPROTO = _descriptor.Descriptor(
+  name='ModelProto',
+  full_name='onnx.ModelProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='ir_version', full_name='onnx.ModelProto.ir_version', index=0,
+      number=1, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='opset_import', full_name='onnx.ModelProto.opset_import', index=1,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='producer_name', full_name='onnx.ModelProto.producer_name', index=2,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='producer_version', full_name='onnx.ModelProto.producer_version', index=3,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='domain', full_name='onnx.ModelProto.domain', index=4,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='model_version', full_name='onnx.ModelProto.model_version', index=5,
+      number=5, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.ModelProto.doc_string', index=6,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='graph', full_name='onnx.ModelProto.graph', index=7,
+      number=7, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='functions', full_name='onnx.ModelProto.functions', index=8,
+      number=100, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='metadata_props', full_name='onnx.ModelProto.metadata_props', index=9,
+      number=14, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=743,
+  serialized_end=1058,
+)
+
+
+_STRINGSTRINGENTRYPROTO = _descriptor.Descriptor(
+  name='StringStringEntryProto',
+  full_name='onnx.StringStringEntryProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='key', full_name='onnx.StringStringEntryProto.key', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='onnx.StringStringEntryProto.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1060,
+  serialized_end=1112,
+)
+
+
+_TENSORANNOTATION = _descriptor.Descriptor(
+  name='TensorAnnotation',
+  full_name='onnx.TensorAnnotation',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='tensor_name', full_name='onnx.TensorAnnotation.tensor_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='quant_parameter_tensor_names', full_name='onnx.TensorAnnotation.quant_parameter_tensor_names', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1114,
+  serialized_end=1221,
+)
+
+
+_GRAPHPROTO = _descriptor.Descriptor(
+  name='GraphProto',
+  full_name='onnx.GraphProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='node', full_name='onnx.GraphProto.node', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.GraphProto.name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='initializer', full_name='onnx.GraphProto.initializer', index=2,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.GraphProto.doc_string', index=3,
+      number=10, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='input', full_name='onnx.GraphProto.input', index=4,
+      number=11, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='output', full_name='onnx.GraphProto.output', index=5,
+      number=12, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value_info', full_name='onnx.GraphProto.value_info', index=6,
+      number=13, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='quantization_annotation', full_name='onnx.GraphProto.quantization_annotation', index=7,
+      number=14, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1224,
+  serialized_end=1515,
+)
+
+
+_TENSORPROTO_SEGMENT = _descriptor.Descriptor(
+  name='Segment',
+  full_name='onnx.TensorProto.Segment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='begin', full_name='onnx.TensorProto.Segment.begin', index=0,
+      number=1, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='end', full_name='onnx.TensorProto.Segment.end', index=1,
+      number=2, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1913,
+  serialized_end=1950,
+)
+
+_TENSORPROTO = _descriptor.Descriptor(
+  name='TensorProto',
+  full_name='onnx.TensorProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='dims', full_name='onnx.TensorProto.dims', index=0,
+      number=1, type=3, cpp_type=2, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='data_type', full_name='onnx.TensorProto.data_type', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='segment', full_name='onnx.TensorProto.segment', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='float_data', full_name='onnx.TensorProto.float_data', index=3,
+      number=4, type=2, cpp_type=6, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=_b('\020\001'), file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='int32_data', full_name='onnx.TensorProto.int32_data', index=4,
+      number=5, type=5, cpp_type=1, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=_b('\020\001'), file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='string_data', full_name='onnx.TensorProto.string_data', index=5,
+      number=6, type=12, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='int64_data', full_name='onnx.TensorProto.int64_data', index=6,
+      number=7, type=3, cpp_type=2, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=_b('\020\001'), file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.TensorProto.name', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.TensorProto.doc_string', index=8,
+      number=12, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='raw_data', full_name='onnx.TensorProto.raw_data', index=9,
+      number=9, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b(""),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='external_data', full_name='onnx.TensorProto.external_data', index=10,
+      number=13, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='data_location', full_name='onnx.TensorProto.data_location', index=11,
+      number=14, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='double_data', full_name='onnx.TensorProto.double_data', index=12,
+      number=10, type=1, cpp_type=5, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=_b('\020\001'), file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='uint64_data', full_name='onnx.TensorProto.uint64_data', index=13,
+      number=11, type=4, cpp_type=4, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=_b('\020\001'), file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[_TENSORPROTO_SEGMENT, ],
+  enum_types=[
+    _TENSORPROTO_DATATYPE,
+    _TENSORPROTO_DATALOCATION,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1518,
+  serialized_end=2214,
+)
+
+
+_TENSORSHAPEPROTO_DIMENSION = _descriptor.Descriptor(
+  name='Dimension',
+  full_name='onnx.TensorShapeProto.Dimension',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='dim_value', full_name='onnx.TensorShapeProto.Dimension.dim_value', index=0,
+      number=1, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='dim_param', full_name='onnx.TensorShapeProto.Dimension.dim_param', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='denotation', full_name='onnx.TensorShapeProto.Dimension.denotation', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+    _descriptor.OneofDescriptor(
+      name='value', full_name='onnx.TensorShapeProto.Dimension.value',
+      index=0, containing_type=None, fields=[]),
+  ],
+  serialized_start=2284,
+  serialized_end=2366,
+)
+
+_TENSORSHAPEPROTO = _descriptor.Descriptor(
+  name='TensorShapeProto',
+  full_name='onnx.TensorShapeProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='dim', full_name='onnx.TensorShapeProto.dim', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[_TENSORSHAPEPROTO_DIMENSION, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2217,
+  serialized_end=2366,
+)
+
+
+_TYPEPROTO_TENSOR = _descriptor.Descriptor(
+  name='Tensor',
+  full_name='onnx.TypeProto.Tensor',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='elem_type', full_name='onnx.TypeProto.Tensor.elem_type', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='shape', full_name='onnx.TypeProto.Tensor.shape', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2648,
+  serialized_end=2714,
+)
+
+_TYPEPROTO_SEQUENCE = _descriptor.Descriptor(
+  name='Sequence',
+  full_name='onnx.TypeProto.Sequence',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='elem_type', full_name='onnx.TypeProto.Sequence.elem_type', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2716,
+  serialized_end=2762,
+)
+
+_TYPEPROTO_MAP = _descriptor.Descriptor(
+  name='Map',
+  full_name='onnx.TypeProto.Map',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='key_type', full_name='onnx.TypeProto.Map.key_type', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value_type', full_name='onnx.TypeProto.Map.value_type', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2764,
+  serialized_end=2824,
+)
+
+_TYPEPROTO_OPAQUE = _descriptor.Descriptor(
+  name='Opaque',
+  full_name='onnx.TypeProto.Opaque',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='domain', full_name='onnx.TypeProto.Opaque.domain', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.TypeProto.Opaque.name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2826,
+  serialized_end=2864,
+)
+
+_TYPEPROTO_SPARSETENSOR = _descriptor.Descriptor(
+  name='SparseTensor',
+  full_name='onnx.TypeProto.SparseTensor',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='elem_type', full_name='onnx.TypeProto.SparseTensor.elem_type', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='shape', full_name='onnx.TypeProto.SparseTensor.shape', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2866,
+  serialized_end=2938,
+)
+
+_TYPEPROTO = _descriptor.Descriptor(
+  name='TypeProto',
+  full_name='onnx.TypeProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='tensor_type', full_name='onnx.TypeProto.tensor_type', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_type', full_name='onnx.TypeProto.sequence_type', index=1,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='map_type', full_name='onnx.TypeProto.map_type', index=2,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='opaque_type', full_name='onnx.TypeProto.opaque_type', index=3,
+      number=7, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sparse_tensor_type', full_name='onnx.TypeProto.sparse_tensor_type', index=4,
+      number=8, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='denotation', full_name='onnx.TypeProto.denotation', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[_TYPEPROTO_TENSOR, _TYPEPROTO_SEQUENCE, _TYPEPROTO_MAP, _TYPEPROTO_OPAQUE, _TYPEPROTO_SPARSETENSOR, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+    _descriptor.OneofDescriptor(
+      name='value', full_name='onnx.TypeProto.value',
+      index=0, containing_type=None, fields=[]),
+  ],
+  serialized_start=2369,
+  serialized_end=2947,
+)
+
+
+_OPERATORSETIDPROTO = _descriptor.Descriptor(
+  name='OperatorSetIdProto',
+  full_name='onnx.OperatorSetIdProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='domain', full_name='onnx.OperatorSetIdProto.domain', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='version', full_name='onnx.OperatorSetIdProto.version', index=1,
+      number=2, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2949,
+  serialized_end=3002,
+)
+
+
+_FUNCTIONPROTO = _descriptor.Descriptor(
+  name='FunctionProto',
+  full_name='onnx.FunctionProto',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='onnx.FunctionProto.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='since_version', full_name='onnx.FunctionProto.since_version', index=1,
+      number=2, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status', full_name='onnx.FunctionProto.status', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='input', full_name='onnx.FunctionProto.input', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='output', full_name='onnx.FunctionProto.output', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='attribute', full_name='onnx.FunctionProto.attribute', index=5,
+      number=6, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='node', full_name='onnx.FunctionProto.node', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='doc_string', full_name='onnx.FunctionProto.doc_string', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3005,
+  serialized_end=3196,
+)
+
+_ATTRIBUTEPROTO.fields_by_name['type'].enum_type = _ATTRIBUTEPROTO_ATTRIBUTETYPE
+_ATTRIBUTEPROTO.fields_by_name['t'].message_type = _TENSORPROTO
+_ATTRIBUTEPROTO.fields_by_name['g'].message_type = _GRAPHPROTO
+_ATTRIBUTEPROTO.fields_by_name['tensors'].message_type = _TENSORPROTO
+_ATTRIBUTEPROTO.fields_by_name['graphs'].message_type = _GRAPHPROTO
+_ATTRIBUTEPROTO_ATTRIBUTETYPE.containing_type = _ATTRIBUTEPROTO
+_VALUEINFOPROTO.fields_by_name['type'].message_type = _TYPEPROTO
+_NODEPROTO.fields_by_name['attribute'].message_type = _ATTRIBUTEPROTO
+_MODELPROTO.fields_by_name['opset_import'].message_type = _OPERATORSETIDPROTO
+_MODELPROTO.fields_by_name['graph'].message_type = _GRAPHPROTO
+_MODELPROTO.fields_by_name['functions'].message_type = _FUNCTIONPROTO
+_MODELPROTO.fields_by_name['metadata_props'].message_type = _STRINGSTRINGENTRYPROTO
+_TENSORANNOTATION.fields_by_name['quant_parameter_tensor_names'].message_type = _STRINGSTRINGENTRYPROTO
+_GRAPHPROTO.fields_by_name['node'].message_type = _NODEPROTO
+_GRAPHPROTO.fields_by_name['initializer'].message_type = _TENSORPROTO
+_GRAPHPROTO.fields_by_name['input'].message_type = _VALUEINFOPROTO
+_GRAPHPROTO.fields_by_name['output'].message_type = _VALUEINFOPROTO
+_GRAPHPROTO.fields_by_name['value_info'].message_type = _VALUEINFOPROTO
+_GRAPHPROTO.fields_by_name['quantization_annotation'].message_type = _TENSORANNOTATION
+_TENSORPROTO_SEGMENT.containing_type = _TENSORPROTO
+_TENSORPROTO.fields_by_name['segment'].message_type = _TENSORPROTO_SEGMENT
+_TENSORPROTO.fields_by_name['external_data'].message_type = _STRINGSTRINGENTRYPROTO
+_TENSORPROTO.fields_by_name['data_location'].enum_type = _TENSORPROTO_DATALOCATION
+_TENSORPROTO_DATATYPE.containing_type = _TENSORPROTO
+_TENSORPROTO_DATALOCATION.containing_type = _TENSORPROTO
+_TENSORSHAPEPROTO_DIMENSION.containing_type = _TENSORSHAPEPROTO
+_TENSORSHAPEPROTO_DIMENSION.oneofs_by_name['value'].fields.append(
+  _TENSORSHAPEPROTO_DIMENSION.fields_by_name['dim_value'])
+_TENSORSHAPEPROTO_DIMENSION.fields_by_name['dim_value'].containing_oneof = _TENSORSHAPEPROTO_DIMENSION.oneofs_by_name['value']
+_TENSORSHAPEPROTO_DIMENSION.oneofs_by_name['value'].fields.append(
+  _TENSORSHAPEPROTO_DIMENSION.fields_by_name['dim_param'])
+_TENSORSHAPEPROTO_DIMENSION.fields_by_name['dim_param'].containing_oneof = _TENSORSHAPEPROTO_DIMENSION.oneofs_by_name['value']
+_TENSORSHAPEPROTO.fields_by_name['dim'].message_type = _TENSORSHAPEPROTO_DIMENSION
+_TYPEPROTO_TENSOR.fields_by_name['shape'].message_type = _TENSORSHAPEPROTO
+_TYPEPROTO_TENSOR.containing_type = _TYPEPROTO
+_TYPEPROTO_SEQUENCE.fields_by_name['elem_type'].message_type = _TYPEPROTO
+_TYPEPROTO_SEQUENCE.containing_type = _TYPEPROTO
+_TYPEPROTO_MAP.fields_by_name['value_type'].message_type = _TYPEPROTO
+_TYPEPROTO_MAP.containing_type = _TYPEPROTO
+_TYPEPROTO_OPAQUE.containing_type = _TYPEPROTO
+_TYPEPROTO_SPARSETENSOR.fields_by_name['shape'].message_type = _TENSORSHAPEPROTO
+_TYPEPROTO_SPARSETENSOR.containing_type = _TYPEPROTO
+_TYPEPROTO.fields_by_name['tensor_type'].message_type = _TYPEPROTO_TENSOR
+_TYPEPROTO.fields_by_name['sequence_type'].message_type = _TYPEPROTO_SEQUENCE
+_TYPEPROTO.fields_by_name['map_type'].message_type = _TYPEPROTO_MAP
+_TYPEPROTO.fields_by_name['opaque_type'].message_type = _TYPEPROTO_OPAQUE
+_TYPEPROTO.fields_by_name['sparse_tensor_type'].message_type = _TYPEPROTO_SPARSETENSOR
+_TYPEPROTO.oneofs_by_name['value'].fields.append(
+  _TYPEPROTO.fields_by_name['tensor_type'])
+_TYPEPROTO.fields_by_name['tensor_type'].containing_oneof = _TYPEPROTO.oneofs_by_name['value']
+_TYPEPROTO.oneofs_by_name['value'].fields.append(
+  _TYPEPROTO.fields_by_name['sequence_type'])
+_TYPEPROTO.fields_by_name['sequence_type'].containing_oneof = _TYPEPROTO.oneofs_by_name['value']
+_TYPEPROTO.oneofs_by_name['value'].fields.append(
+  _TYPEPROTO.fields_by_name['map_type'])
+_TYPEPROTO.fields_by_name['map_type'].containing_oneof = _TYPEPROTO.oneofs_by_name['value']
+_TYPEPROTO.oneofs_by_name['value'].fields.append(
+  _TYPEPROTO.fields_by_name['opaque_type'])
+_TYPEPROTO.fields_by_name['opaque_type'].containing_oneof = _TYPEPROTO.oneofs_by_name['value']
+_TYPEPROTO.oneofs_by_name['value'].fields.append(
+  _TYPEPROTO.fields_by_name['sparse_tensor_type'])
+_TYPEPROTO.fields_by_name['sparse_tensor_type'].containing_oneof = _TYPEPROTO.oneofs_by_name['value']
+_FUNCTIONPROTO.fields_by_name['status'].enum_type = _OPERATORSTATUS
+_FUNCTIONPROTO.fields_by_name['node'].message_type = _NODEPROTO
+DESCRIPTOR.message_types_by_name['AttributeProto'] = _ATTRIBUTEPROTO
+DESCRIPTOR.message_types_by_name['ValueInfoProto'] = _VALUEINFOPROTO
+DESCRIPTOR.message_types_by_name['NodeProto'] = _NODEPROTO
+DESCRIPTOR.message_types_by_name['ModelProto'] = _MODELPROTO
+DESCRIPTOR.message_types_by_name['StringStringEntryProto'] = _STRINGSTRINGENTRYPROTO
+DESCRIPTOR.message_types_by_name['TensorAnnotation'] = _TENSORANNOTATION
+DESCRIPTOR.message_types_by_name['GraphProto'] = _GRAPHPROTO
+DESCRIPTOR.message_types_by_name['TensorProto'] = _TENSORPROTO
+DESCRIPTOR.message_types_by_name['TensorShapeProto'] = _TENSORSHAPEPROTO
+DESCRIPTOR.message_types_by_name['TypeProto'] = _TYPEPROTO
+DESCRIPTOR.message_types_by_name['OperatorSetIdProto'] = _OPERATORSETIDPROTO
+DESCRIPTOR.message_types_by_name['FunctionProto'] = _FUNCTIONPROTO
+DESCRIPTOR.enum_types_by_name['Version'] = _VERSION
+DESCRIPTOR.enum_types_by_name['OperatorStatus'] = _OPERATORSTATUS
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+AttributeProto = _reflection.GeneratedProtocolMessageType('AttributeProto', (_message.Message,), dict(
+  DESCRIPTOR = _ATTRIBUTEPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.AttributeProto)
+  ))
+_sym_db.RegisterMessage(AttributeProto)
+
+ValueInfoProto = _reflection.GeneratedProtocolMessageType('ValueInfoProto', (_message.Message,), dict(
+  DESCRIPTOR = _VALUEINFOPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.ValueInfoProto)
+  ))
+_sym_db.RegisterMessage(ValueInfoProto)
+
+NodeProto = _reflection.GeneratedProtocolMessageType('NodeProto', (_message.Message,), dict(
+  DESCRIPTOR = _NODEPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.NodeProto)
+  ))
+_sym_db.RegisterMessage(NodeProto)
+
+ModelProto = _reflection.GeneratedProtocolMessageType('ModelProto', (_message.Message,), dict(
+  DESCRIPTOR = _MODELPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.ModelProto)
+  ))
+_sym_db.RegisterMessage(ModelProto)
+
+StringStringEntryProto = _reflection.GeneratedProtocolMessageType('StringStringEntryProto', (_message.Message,), dict(
+  DESCRIPTOR = _STRINGSTRINGENTRYPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.StringStringEntryProto)
+  ))
+_sym_db.RegisterMessage(StringStringEntryProto)
+
+TensorAnnotation = _reflection.GeneratedProtocolMessageType('TensorAnnotation', (_message.Message,), dict(
+  DESCRIPTOR = _TENSORANNOTATION,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.TensorAnnotation)
+  ))
+_sym_db.RegisterMessage(TensorAnnotation)
+
+GraphProto = _reflection.GeneratedProtocolMessageType('GraphProto', (_message.Message,), dict(
+  DESCRIPTOR = _GRAPHPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.GraphProto)
+  ))
+_sym_db.RegisterMessage(GraphProto)
+
+TensorProto = _reflection.GeneratedProtocolMessageType('TensorProto', (_message.Message,), dict(
+
+  Segment = _reflection.GeneratedProtocolMessageType('Segment', (_message.Message,), dict(
+    DESCRIPTOR = _TENSORPROTO_SEGMENT,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TensorProto.Segment)
+    ))
+  ,
+  DESCRIPTOR = _TENSORPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.TensorProto)
+  ))
+_sym_db.RegisterMessage(TensorProto)
+_sym_db.RegisterMessage(TensorProto.Segment)
+
+TensorShapeProto = _reflection.GeneratedProtocolMessageType('TensorShapeProto', (_message.Message,), dict(
+
+  Dimension = _reflection.GeneratedProtocolMessageType('Dimension', (_message.Message,), dict(
+    DESCRIPTOR = _TENSORSHAPEPROTO_DIMENSION,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TensorShapeProto.Dimension)
+    ))
+  ,
+  DESCRIPTOR = _TENSORSHAPEPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.TensorShapeProto)
+  ))
+_sym_db.RegisterMessage(TensorShapeProto)
+_sym_db.RegisterMessage(TensorShapeProto.Dimension)
+
+TypeProto = _reflection.GeneratedProtocolMessageType('TypeProto', (_message.Message,), dict(
+
+  Tensor = _reflection.GeneratedProtocolMessageType('Tensor', (_message.Message,), dict(
+    DESCRIPTOR = _TYPEPROTO_TENSOR,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TypeProto.Tensor)
+    ))
+  ,
+
+  Sequence = _reflection.GeneratedProtocolMessageType('Sequence', (_message.Message,), dict(
+    DESCRIPTOR = _TYPEPROTO_SEQUENCE,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TypeProto.Sequence)
+    ))
+  ,
+
+  Map = _reflection.GeneratedProtocolMessageType('Map', (_message.Message,), dict(
+    DESCRIPTOR = _TYPEPROTO_MAP,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TypeProto.Map)
+    ))
+  ,
+
+  Opaque = _reflection.GeneratedProtocolMessageType('Opaque', (_message.Message,), dict(
+    DESCRIPTOR = _TYPEPROTO_OPAQUE,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TypeProto.Opaque)
+    ))
+  ,
+
+  SparseTensor = _reflection.GeneratedProtocolMessageType('SparseTensor', (_message.Message,), dict(
+    DESCRIPTOR = _TYPEPROTO_SPARSETENSOR,
+    __module__ = 'onnx_ml_pb2'
+    # @@protoc_insertion_point(class_scope:onnx.TypeProto.SparseTensor)
+    ))
+  ,
+  DESCRIPTOR = _TYPEPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.TypeProto)
+  ))
+_sym_db.RegisterMessage(TypeProto)
+_sym_db.RegisterMessage(TypeProto.Tensor)
+_sym_db.RegisterMessage(TypeProto.Sequence)
+_sym_db.RegisterMessage(TypeProto.Map)
+_sym_db.RegisterMessage(TypeProto.Opaque)
+_sym_db.RegisterMessage(TypeProto.SparseTensor)
+
+OperatorSetIdProto = _reflection.GeneratedProtocolMessageType('OperatorSetIdProto', (_message.Message,), dict(
+  DESCRIPTOR = _OPERATORSETIDPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.OperatorSetIdProto)
+  ))
+_sym_db.RegisterMessage(OperatorSetIdProto)
+
+FunctionProto = _reflection.GeneratedProtocolMessageType('FunctionProto', (_message.Message,), dict(
+  DESCRIPTOR = _FUNCTIONPROTO,
+  __module__ = 'onnx_ml_pb2'
+  # @@protoc_insertion_point(class_scope:onnx.FunctionProto)
+  ))
+_sym_db.RegisterMessage(FunctionProto)
+
+
+_TENSORPROTO.fields_by_name['float_data']._options = None
+_TENSORPROTO.fields_by_name['int32_data']._options = None
+_TENSORPROTO.fields_by_name['int64_data']._options = None
+_TENSORPROTO.fields_by_name['double_data']._options = None
+_TENSORPROTO.fields_by_name['uint64_data']._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/docs/samples/onnx/assets/predict_pb2.py b/docs/samples/onnx/assets/predict_pb2.py
new file mode 100644
--- /dev/null
+++ b/docs/samples/onnx/assets/predict_pb2.py
@@ -0,0 +1,215 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: predict.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+import assets.onnx_ml_pb2 as onnx__ml__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='predict.proto',
+  package='onnxruntime.server',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\rpredict.proto\x12\x12onnxruntime.server\x1a\ronnx-ml.proto\"\xaf\x01\n\x0ePredictRequest\x12>\n\x06inputs\x18\x02 \x03(\x0b\x32..onnxruntime.server.PredictRequest.InputsEntry\x12\x15\n\routput_filter\x18\x03 \x03(\t\x1a@\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.onnx.TensorProto:\x02\x38\x01J\x04\x08\x01\x10\x02\"\x97\x01\n\x0fPredictResponse\x12\x41\n\x07outputs\x18\x01 \x03(\x0b\x32\x30.onnxruntime.server.PredictResponse.OutputsEntry\x1a\x41\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.onnx.TensorProto:\x02\x38\x01\x62\x06proto3')
+  ,
+  dependencies=[onnx__ml__pb2.DESCRIPTOR,])
+
+
+
+
+_PREDICTREQUEST_INPUTSENTRY = _descriptor.Descriptor(
+  name='InputsEntry',
+  full_name='onnxruntime.server.PredictRequest.InputsEntry',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='key', full_name='onnxruntime.server.PredictRequest.InputsEntry.key', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='onnxruntime.server.PredictRequest.InputsEntry.value', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=_b('8\001'),
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=158,
+  serialized_end=222,
+)
+
+_PREDICTREQUEST = _descriptor.Descriptor(
+  name='PredictRequest',
+  full_name='onnxruntime.server.PredictRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='inputs', full_name='onnxruntime.server.PredictRequest.inputs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='output_filter', full_name='onnxruntime.server.PredictRequest.output_filter', index=1,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[_PREDICTREQUEST_INPUTSENTRY, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=53,
+  serialized_end=228,
+)
+
+
+_PREDICTRESPONSE_OUTPUTSENTRY = _descriptor.Descriptor(
+  name='OutputsEntry',
+  full_name='onnxruntime.server.PredictResponse.OutputsEntry',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='key', full_name='onnxruntime.server.PredictResponse.OutputsEntry.key', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='onnxruntime.server.PredictResponse.OutputsEntry.value', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=_b('8\001'),
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=317,
+  serialized_end=382,
+)
+
+_PREDICTRESPONSE = _descriptor.Descriptor(
+  name='PredictResponse',
+  full_name='onnxruntime.server.PredictResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='outputs', full_name='onnxruntime.server.PredictResponse.outputs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[_PREDICTRESPONSE_OUTPUTSENTRY, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=231,
+  serialized_end=382,
+)
+
+_PREDICTREQUEST_INPUTSENTRY.fields_by_name['value'].message_type = onnx__ml__pb2._TENSORPROTO
+_PREDICTREQUEST_INPUTSENTRY.containing_type = _PREDICTREQUEST
+_PREDICTREQUEST.fields_by_name['inputs'].message_type = _PREDICTREQUEST_INPUTSENTRY
+_PREDICTRESPONSE_OUTPUTSENTRY.fields_by_name['value'].message_type = onnx__ml__pb2._TENSORPROTO
+_PREDICTRESPONSE_OUTPUTSENTRY.containing_type = _PREDICTRESPONSE
+_PREDICTRESPONSE.fields_by_name['outputs'].message_type = _PREDICTRESPONSE_OUTPUTSENTRY
+DESCRIPTOR.message_types_by_name['PredictRequest'] = _PREDICTREQUEST
+DESCRIPTOR.message_types_by_name['PredictResponse'] = _PREDICTRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+PredictRequest = _reflection.GeneratedProtocolMessageType('PredictRequest', (_message.Message,), dict(
+
+  InputsEntry = _reflection.GeneratedProtocolMessageType('InputsEntry', (_message.Message,), dict(
+    DESCRIPTOR = _PREDICTREQUEST_INPUTSENTRY,
+    __module__ = 'predict_pb2'
+    # @@protoc_insertion_point(class_scope:onnxruntime.server.PredictRequest.InputsEntry)
+    ))
+  ,
+  DESCRIPTOR = _PREDICTREQUEST,
+  __module__ = 'predict_pb2'
+  # @@protoc_insertion_point(class_scope:onnxruntime.server.PredictRequest)
+  ))
+_sym_db.RegisterMessage(PredictRequest)
+_sym_db.RegisterMessage(PredictRequest.InputsEntry)
+
+PredictResponse = _reflection.GeneratedProtocolMessageType('PredictResponse', (_message.Message,), dict(
+
+  OutputsEntry = _reflection.GeneratedProtocolMessageType('OutputsEntry', (_message.Message,), dict(
+    DESCRIPTOR = _PREDICTRESPONSE_OUTPUTSENTRY,
+    __module__ = 'predict_pb2'
+    # @@protoc_insertion_point(class_scope:onnxruntime.server.PredictResponse.OutputsEntry)
+    ))
+  ,
+  DESCRIPTOR = _PREDICTRESPONSE,
+  __module__ = 'predict_pb2'
+  # @@protoc_insertion_point(class_scope:onnxruntime.server.PredictResponse)
+  ))
+_sym_db.RegisterMessage(PredictResponse)
+_sym_db.RegisterMessage(PredictResponse.OutputsEntry)
+
+
+_PREDICTREQUEST_INPUTSENTRY._options = None
+_PREDICTRESPONSE_OUTPUTSENTRY._options = None
+# @@protoc_insertion_point(module_scope)


Test patch:
diff --git a/pkg/apis/serving/v1alpha2/framework_onnx_test.go b/pkg/apis/serving/v1alpha2/framework_onnx_test.go
new file mode 100644
--- /dev/null
+++ b/pkg/apis/serving/v1alpha2/framework_onnx_test.go
@@ -0,0 +1,76 @@
+/*
+Copyright 2019 kubeflow.org.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/resource"
+
+	"github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+)
+
+var onnxRequestedResource = v1.ResourceRequirements{
+	Limits: v1.ResourceList{
+		"cpu": resource.Quantity{
+			Format: "100",
+		},
+	},
+	Requests: v1.ResourceList{
+		"cpu": resource.Quantity{
+			Format: "90",
+		},
+	},
+}
+
+var onnxSpec = ONNXSpec{
+	ModelURI:       "gs://someUri",
+	Resources:      onnxRequestedResource,
+	RuntimeVersion: "someAmazingVersion",
+}
+
+var onnxConfig = FrameworksConfig{
+	ONNX: FrameworkConfig{
+		ContainerImage: "someOtherImage",
+	},
+}
+
+func TestCreateOnnxModelServingContainer(t *testing.T) {
+
+	g := gomega.NewGomegaWithT(t)
+
+	expectedContainer := &v1.Container{
+		Image:     "someOtherImage:someAmazingVersion",
+		Resources: onnxRequestedResource,
+		Args: []string{
+			"--model_path", "/mnt/models/model.onnx",
+			"--http_port", "8080",
+			"--grpc_port", "9000",
+		},
+	}
+
+	// Test Create with config
+	container := onnxSpec.CreateModelServingContainer("someName", &onnxConfig)
+	g.Expect(container).To(gomega.Equal(expectedContainer))
+
+	// Test Create without config
+	expectedContainer.Image = "mcr.microsoft.com/onnxruntime/server:someAmazingVersion"
+	emptyConfig := FrameworksConfig{ONNX: FrameworkConfig{}}
+	container = onnxSpec.CreateModelServingContainer("someName", &emptyConfig)
+	g.Expect(container).To(gomega.Equal(expectedContainer))
+}