.. _f-sgdlearningpenalty: module ``training.sgd_learning_penalty`` ======================================== .. inheritance-diagram:: onnxcustom.training.sgd_learning_penalty Short summary +++++++++++++ module ``onnxcustom.training.sgd_learning_penalty`` Helper for :epkg:`onnxruntime-training`. :githublink:`%|py|6` Classes +++++++ +---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===================================================================================================+========================================================================================================+ | :class:`BaseLearningPenalty ` | Class handling the penalty on the coefficients for class :class:`OrtGradientForwardBackwardOptimizer`. | +---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :class:`ElasticLearningPenalty ` | Implements a L1 or L2 regularization on weights. | +---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :class:`NoLearningPenalty ` | No regularization. | +---------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +-----------------------------------------------------------------------------------------+-----------------------------------------------------------+ | staticmethod | truncated documentation | +=========================================================================================+===========================================================+ | :meth:`select ` | Returns an instance of a given initialized with *kwargs*. | +-----------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`select ` | Returns an instance of a given initialized with *kwargs*. | +-----------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`select ` | Returns an instance of a given initialized with *kwargs*. | +-----------------------------------------------------------------------------------------+-----------------------------------------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | method | truncated documentation | +===================================================================================================================+================================================================================+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`penalty_loss ` | Returns the received loss. Updates the loss inplace. | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`penalty_loss ` | Computes the penalty associated to every weights and adds them up to the loss. | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`penalty_loss ` | Returns the received loss. Updates the loss inplace. | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`update_weights ` | Returns the received loss. Updates the weight inplace. | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`update_weights ` | | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ | :meth:`update_weights ` | Returns the received loss. Updates the weight inplace. | +-------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: onnxcustom.training.sgd_learning_penalty :members: :special-members: __init__ :show-inheritance: