pymoose.predictors.onnx_convert module#

pymoose.predictors.onnx_convert.from_onnx(model_proto)[source]#

Attempt to infer and construct a Moose predictor type from a given ONNX Model.

Parameters

model_proto – An ONNX ModelProto containing nodes sufficient to construct some Moose predictor.

Returns

A Moose predictor, inferred from the structure and contents of the ONNX model.

Raises
  • ValueError if the Predictor type cannot be inferred, or if the ONNX graph is – malformed for the inferred Predictor type.

  • RuntimeError if LinearClassifier constructor throws an error due to unrecognized – post_transform attribute.