Files
zeekayandHanzo Dev f84fe1fd15 snapshot slice 1
Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 15:29:05 -07:00

2.6 KiB

In [1]:
# NBVAL_SKIP
# Protobuf 4 and Protobuf 3 might output different order of protobuf fields

import onnx
import os


# Load the ONNX model
onnx_model = onnx.load(os.path.join("resources", "single_relu.onnx"))
print(onnx_model)
ir_version: 3
producer_name: "backend-test"
graph {
  node {
    input: "x"
    output: "y"
    name: "test"
    op_type: "Relu"
  }
  name: "SingleRelu"
  input {
    name: "x"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  output {
    name: "y"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
}
opset_import {
  version: 6
}

In [ ]: