Readonly
evalGet input names of the loaded eval model. Is an empty array if no eval model is loaded.
Readonly
evalGet output names of the loaded eval model. Is an empty array if no eval model is loaded.
Readonly
trainingGet input names of the loaded training model.
Readonly
trainingGet output names of the loaded training model.
Copies the model parameters to a contiguous buffer. Usually used in the context of Federated Learning. Currently, only supporting models with parameters of type Float32.
When set to true, only trainable parameters are copied. Trainable parameters are parameters for which requires_grad is set to true. Default value is true.
A promise that resolves to a Float32 OnnxValue of the requested parameters.
Retrieves the size of all parameters for the training state. Calculates the total number of primitive (datatype of the parameters) elements of all the parameters in the training state.
When set to true, the size is calculated for trainable params only. Default value is true.
Copies parameter values from the given buffer to the training state. Currently, only supporting models with parameters of type Float32.
A Uint8Array representation of Float32 parameters.
True if trainable parameters only to be modified, false otherwise. Default value is true.
Run a single eval step with the given inputs and options using the eval model.
Representation of the model input.
Optional
options: RunOptionsOptional. A set of options that controls the behavior of model eval step.
A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.
Run a single eval step with the given inputs and options using the eval model.
Representation of the model input.
Representation of the model output. detail.
Optional
options: RunOptionsOptional. A set of options that controls the behavior of model eval step.
A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.
Runs a single optimizer step, which performs weight updates for the trainable parameters using the optimizer model.
Optional
options: RunOptionsOptional. A set of options that controls the behavior of model optimizing.
Run TrainStep asynchronously with the given feeds and options.
Representation of the model input. See type description of InferenceSession.InputType
for
detail.
Optional
options: RunOptionsOptional. A set of options that controls the behavior of model training.
A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.
Run a single train step with the given inputs and options.
Representation of the model input.
Representation of the model output. detail.
Optional
options: RunOptionsOptional. A set of options that controls the behavior of model training.
A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.
Generated using TypeDoc
Represent a runtime instance of an ONNX training session, which contains a model that can be trained, and, optionally, an eval and optimizer model.