concrete.ml.onnx.onnx_utils
module concrete.ml.onnx.onnx_utils
concrete.ml.onnx.onnx_utilsUtils to interpret an ONNX model with numpy.
Global Variables
ATTR_TYPES
ATTR_GETTERS
ONNX_OPS_TO_NUMPY_IMPL
ONNX_COMPARISON_OPS_TO_NUMPY_IMPL_FLOAT
ONNX_COMPARISON_OPS_TO_NUMPY_IMPL_BOOL
ONNX_OPS_TO_NUMPY_IMPL_BOOL
IMPLEMENTED_ONNX_OPS
function get_attribute
get_attributeget_attribute(attribute: AttributeProto) → AnyGet the attribute from an ONNX AttributeProto.
Args:
attribute(onnx.AttributeProto): The attribute to retrieve the value from.
Returns:
Any: The stored attribute value.
function get_op_name
get_op_nameget_op_name(node)Construct the qualified name of the ONNX operator.
Args:
node(Any): ONNX graph node
Returns:
result(str): qualified name
function execute_onnx_with_numpy
execute_onnx_with_numpyexecute_onnx_with_numpy(graph: GraphProto, *inputs: ndarray) → Tuple[ndarray, ]Execute the provided ONNX graph on the given inputs.
Args:
graph(onnx.GraphProto): The ONNX graph to execute.*inputs: The inputs of the graph.
Returns:
Tuple[numpy.ndarray]: The result of the graph's execution.
Last updated
Was this helpful?