.. _f-sgdlearningloss: module ``training.sgd_learning_loss`` ===================================== .. inheritance-diagram:: onnxcustom.training.sgd_learning_loss Short summary +++++++++++++ module ``onnxcustom.training.sgd_learning_loss`` Helper for :epkg:`onnxruntime-training`. :githublink:`%|py|6` Classes +++++++ +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +============================================================================================+==============================================================================================================================================+ | :class:`AbsoluteLearningLoss ` | Implements a square loss :math:`|Y - Z|` where *Y* is the output and *Z* the expected output. See :func:`_onnx_grad_loss_absolute_error` ... | +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseLearningLoss ` | Class handling the loss for class :class:`OrtGradientForwardBackwardOptimizer`. All classes inheriting from this ... | +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ElasticLearningLoss ` | Implements a square loss :math:`(Y - Z)^2 \alpha + |Y - Z| * \beta` where *Y* is the output and *Z* the expected ... | +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`NegLogLearningLoss ` | Implements a negative log loss `'log(yt, yp) = -(1-yt)\log(1-yp) - yt\log(yp)`, this only works for a binary classification ... | +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`SquareLearningLoss ` | Implements a square loss :math:`(Y - Z)^2` where *Y* is the output and *Z* the expected output. See :func:`_onnx_grad_loss_square_error` ... | +--------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ 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*. | +------------------------------------------------------------------------------------+-----------------------------------------------------------+ | :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:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :py:meth:`_call_iobinding ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_function ` | | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_score_function ` | Assuming the loss function was created. This one takes the onnx graph and generate the onnx graph for the ... | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_score_function ` | Assuming the loss function was created. This one takes the onnx graph and generate the onnx graph for the ... | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_score_function ` | Assuming the loss function was created. This one takes the onnx graph and generate the onnx graph for the ... | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_score_function ` | Assuming the loss function was created. This one takes the onnx graph and generate the onnx graph for the ... | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`build_onnx_score_function ` | Assuming the loss function was created. This one takes the onnx graph and generate the onnx graph for the ... | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_gradient ` | Returns the loss and the gradient as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_gradient ` | Returns the loss and the gradient as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_gradient ` | Returns the loss and the gradient as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_gradient ` | Returns the loss and the gradient as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_gradient ` | Returns the loss and the gradient as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_scores ` | Returns the weighted loss (or score) for every observation as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_scores ` | Returns the weighted loss (or score) for every observation as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_scores ` | Returns the weighted loss (or score) for every observation as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_scores ` | Returns the weighted loss (or score) for every observation as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`loss_scores ` | Returns the weighted loss (or score) for every observation as OrtValue. | +--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: onnxcustom.training.sgd_learning_loss :members: :special-members: __init__ :show-inheritance: