.. _l-classes: Classes ======= .. contents:: :local: :depth: 1 Summary +++++++ +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | class | class parent | 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:`BaseEstimator ` | | Base class for optimizers. Implements common methods such `__repr__`. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseLearningLoss ` | | Class handling the loss for class :class:`OrtGradientForwardBackwardOptimizer`. All classes inheriting from this ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseLearningOnnx ` | | Class handling ONNX function to manipulate OrtValue. Base class for :class:`BaseLearningRate` and :class:`BaseLearningLoss`. ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseLearningPenalty ` | | Class handling the penalty on the coefficients for class :class:`OrtGradientForwardBackwardOptimizer`. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseLearningRate ` | | Class handling the learning rate update after every iteration of a gradient. Two methods need to be overwritten ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`BaseOnnxClass ` | | Bases class with common functions to handle attributes in classes owning ONNX graphs. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`Cbids ` | | List of events. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ConvergenceError ` | | Raised when a learning algorithm failed to converge. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ConvergenceWarning ` | | Raised when a learning algorithm failed to converge. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`DerivativeOptions ` | | Options defining how to build the onnx graph of the gradients. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ElasticLearningLoss ` | | Implements a square loss :math:`(Y - Z)^2 \alpha + |Y - Z| * \beta` where *Y* is the output and *Z* the expected ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ElasticLearningPenalty ` | | Implements a L1 or L2 regularization on weights. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`EvaluationError ` | | Raised when an evaluation failed. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`LearningRateSGD ` | | Implements the learning the same way as :class:`sklearn.linear_model.SGDRegressor`. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`LearningRateSGDNesterov ` | | Implements the learning the same way as :class:`sklearn.linear_model.SGDRegressor`. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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:`NoLearningPenalty ` | | No regularization. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxSegment ` | | A segments of an onnx graph assuming it is the concatenation of all segments. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxSplitting ` | | The final goal is to split an onnx model into equivalent pieces. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OrtDataLoader ` | | Draws consecutive random observations from a dataset by batch. It iterates over the datasets by drawing *batch_size* ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OrtGradientForwardBackward ` | | Implements forward backward mechanism assuming the function to train is defined by an ONNX graph. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OrtGradientForwardBackwardFunction ` | | Ancestor for a class implementing forward and backward and dynamically created by :class:`OrtGradientForwardBackward`. ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OrtGradientForwardBackwardOptimizer ` | | Implements a simple :epkg:`Stochastic Gradient Descent` with :epkg:`onnxruntime-training`. It leverages class :class:`OrtGradientForwardBackward`. ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OrtGradientOptimizer ` | | Implements a simple :epkg:`Stochastic Gradient Descent` with :epkg:`onnxruntime-training`. | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`ProviderError ` | | Raised when an input is not on the expected device (CPU, GPU). | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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` ... | +---------------------------------------------------------------------------------------------------------------------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+