.. _f-optimizerspartial: module ``training.optimizers_partial`` ====================================== .. inheritance-diagram:: onnxcustom.training.optimizers_partial Short summary +++++++++++++ module ``onnxcustom.training.optimizers_partial`` Optimizer with :epkg:`onnxruntime-training` forward backward training. :githublink:`%|py|5` Classes +++++++ +---------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===========================================================================================================================+========================================================================================================================================================+ | :class:`OrtGradientForwardBackwardOptimizer ` | Implements a simple :epkg:`Stochastic Gradient Descent` with :epkg:`onnxruntime-training`. It leverages class :class:`OrtGradientForwardBackward`. ... | +---------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | property | truncated documentation | +==================================================================================================================+=========================================================================+ | :meth:`needs_grad ` | Returns the True if the gradient update needs to retain past gradients. | +------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`trained_coef_ ` | Returns the trained coefficients a dictionary. | +------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +===========================================================================================================================================+===============================================================================================================+ | :py:meth:`__getstate__ ` | Removes any non pickable attribute. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | Restores any non pickable attribute. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_create_training_session ` | | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_evaluation ` | | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_get_att_state ` | | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_iteration ` | | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | Creates ONNX graph and *InferenceSession* related to any operations applying on *OrtValue*. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Trains the model. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`get_full_state ` | Returns the trained weights and the inputs. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`get_state ` | Returns the trained weights. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`get_trained_onnx ` | Returns the trained onnx graph, the initial graph modified by replacing the initializers with the trained ... | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`losses ` | Returns the losses associated to every observation. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`score ` | Return the whole score associated. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`set_state ` | Changes the trained weights. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: onnxcustom.training.optimizers_partial :members: :special-members: __init__ :show-inheritance: