create_model_proto()¶
- audonnx.testing.create_model_proto(shapes, *, dtype=1, opset_version=14, ir_version=7)[source]¶
Create test ONNX proto object.
Creates an identity graph with input and output nodes of the given
shapes. For each entry an input and output node will be created.-1,Noneor strings define a dynamic axis. Per node, one dynamic axis is allowed. The identity graph can be used aspathargument ofaudonnx.Model.- Parameters:
- Return type:
ModelProto- Returns:
ONNX object
Examples
>>> model = create_model_proto([[2]]) >>> print(onnx.printer.to_text(model)) < ir_version: 7, opset_import: ["" : 14], producer_name: "test" > test (float[2] "input-0") => (float[2] "output-0") { "output-0" = Identity ("input-0") }