module training._base_estimator
#
Short summary#
module onnxcustom.training._base_estimator
Optimizer with onnxruntime-training.
Classes#
class |
truncated documentation |
---|---|
Base class for optimizers. Implements common methods such __repr__. |
Static Methods#
staticmethod |
truncated documentation |
---|---|
Extracts all parameters to serialize. |
Methods#
method |
truncated documentation |
---|---|
Removes any non pickable attribute. |
|
Usual. |
|
Restores any non pickable attribute. |
|
Returns the trained onnx graph, the initial graph modified by replacing the initializers with the trained … |
|
Returns the list of parameters. Parameter deep is unused. |
|
Returns the trained onnx graph, the initial graph modified by replacing the initializers with the trained … |
|
Returns the list of parameters. Parameter deep is unused. |
Documentation#
Optimizer with onnxruntime-training.
- class onnxcustom.training._base_estimator.BaseEstimator(model_onnx, learning_rate, device)#
Bases:
BaseOnnxClass
Base class for optimizers. Implements common methods such __repr__.
- Parameters:
model_onnx – onnx graph to train
learning_rate – learning rate class, see module
onnxcustom.training.sgd_learning_rate
device – device as C_OrtDevice or a string representing this device
- __getstate__()#
Removes any non pickable attribute.
- __init__(model_onnx, learning_rate, device)#
- __repr__()#
Usual.
- __setstate__(state)#
Restores any non pickable attribute.
- classmethod _get_param_names()#
Extracts all parameters to serialize.
- _get_trained_onnx(state, model=None)#
Returns the trained onnx graph, the initial graph modified by replacing the initializers with the trained weights.
- Parameters:
state – trained weights
model – replace the weights in another graph than the training graph
- Returns:
onnx graph
- get_params(deep=False)#
Returns the list of parameters. Parameter deep is unused.
- get_trained_onnx()#
Returns the trained onnx graph, the initial graph modified by replacing the initializers with the trained weights.
- Returns:
onnx graph
- set_params(**params)#
Returns the list of parameters. Parameter deep is unused.