1. Model conversion
Convert a Python model into C code
- class emlearn.convert.Model[source]
Inference model powered by emlearn
Wrapper around the underlying C code. Allows using the model in Python code, for evaluation/testing. Follows scikit-learn API conventions.
- emlearn.convert.convert(estimator, kind: str | None = None, method: str = 'loadable', dtype: str | None = None, return_type: str = 'classifier', **kwargs) Model [source]
Convert model to C
- Parameters:
kind – Explicit name for the type of model. Useful if the model is a subclass of a supported model class
method – The inference strategy to use. inline|loadable
dtype – Datatype to use for features. Can be used to enable quantization
return_type – Return type of the model. ‘classifier’ (default) creates a classifier (output binarized when needed), ‘regressor’ creates a regressor (output type is float).
- Returns:
A Estimator like class, that uses C code for inference