peal.architectures.onnx_predictor.inspect_onnx¶
- peal.architectures.onnx_predictor.inspect_onnx(path)[source]¶
Declared interface of an ONNX graph.
Returns a dict with
input_name,input_shape(list; symbolic dims are None),output_name,output_shape,num_outputs(the size of the last output axis, i.e. the number of classes for a classifier, or None when symbolic),opsetandir_version. RaisesValueErrorwhen the graph is not a single-input single-output model.- Parameters:
path (
str) – Path of the.onnxfile. External weight data is not loaded.- Returns:
Keys
input_name,input_shape,output_name,output_shape,num_outputs,opset,ir_versionandproducer.- Return type:
- Raises:
ValueError – If the graph has more than one non-initializer input or no output.