.. _f-backend: module ``onnxrt.backend`` ========================= .. inheritance-diagram:: mlprodict.onnxrt.backend Short summary +++++++++++++ module ``mlprodict.onnxrt.backend`` ONNX Backend for :class:`OnnxInference`. :: import unittest from onnx.backend.test import BackendTest backend_test = BackendTest(backend, __name__) back_test.include('.*add.*') globals().update(backend_test.enable_report().test_cases) unittest.main() :githublink:`%|py|0` Classes +++++++ +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===========================================================================================+====================================================================================================================================+ | :class:`_CombineModels ` | | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackend ` | ONNX backend following the pattern from `onnx/backend/base.py `_. ... | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendMicro ` | Same backend as @see cl OnnxInferenceBackend but runtime is @see cl OnnxMicroRuntime. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendOrt ` | Same backend as @see cl OnnxInferenceBackend but runtime is `onnxruntime1`. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendPyC ` | Same backend as @see cl OnnxInferenceBackend but runtime is `python_compiled`. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendPyEval ` | Same backend as @see cl OnnxInferenceBackend but runtime is @see cl OnnxShapeInference. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendRep ` | Computes the prediction for an ONNX graph loaded with @see cl OnnxInference. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxInferenceBackendShape ` | Same backend as @see cl OnnxInferenceBackend but runtime is @see cl OnnxShapeInference. | +-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +-----------------------------------------------------------------------------+---------------------------+ | property | truncated documentation | +=============================================================================+===========================+ | :meth:`input_names ` | Returns the input names. | +-----------------------------------------------------------------------------+---------------------------+ | :meth:`output_names ` | Returns the output names. | +-----------------------------------------------------------------------------+---------------------------+ Static Methods ++++++++++++++ +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | staticmethod | truncated documentation | +=================================================================================================================+======================================================================================================================+ | :meth:`create_inference_session ` | Instantiates an instance of class @see cl OnnxInference. This method should be overwritten to change the runtime ... | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`create_inference_session ` | | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`create_inference_session ` | | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`create_inference_session ` | | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`create_inference_session ` | | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`create_inference_session ` | | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_compatible ` | Returns whether the model is compatible with the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`is_opset_supported ` | Returns whether the opset for the model is supported by the backend. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`prepare ` | Loads the model and creates @see cl OnnxInference. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_model ` | Computes the prediction. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`run_node ` | This method is not implemented as it is much more efficient to run a whole model than every node independently. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`supports_device ` | Checks whether the backend is compiled with particular device support. | +-----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------+-----------------------------------------------------------+ | method | truncated documentation | +=================================================================================+===========================================================+ | :py:meth:`__init__ ` | | +---------------------------------------------------------------------------------+-----------------------------------------------------------+ | :py:meth:`__init__ ` | | +---------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`run ` | Computes the prediction. See @see meth OnnxInference.run. | +---------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`run ` | Runs shape inferance and onnx inference. | +---------------------------------------------------------------------------------+-----------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.onnxrt.backend :members: :special-members: __init__ :show-inheritance: