Train multi-output neural network
Trains a multi-output model for a fixed number of epochs (iterations on a dataset).
Inputs
-
Neural network — NeuralNetwork
The neural network to train.
-
Training X — Tensor
Training input data.
-
Training Y — DynamicObject
A DynamicObject mapping the output names of the neural network to the correspoding training output data.
-
Optimizer — NeuralNetworkOptimizer
Optimizer instance.
-
Loss — DynamicObject
A DynamicObject mapping the output names of the neural network to the corresponding objective function instance. If Loss weights is not specified, then the loss value that will be minimized by the model will then be the sum of all individual losses.
-
Metrics — DynamicObject
A DynamicObject mapping the output names of the neural network to a metric instance or a list of metric instances that will be evaluated by the model during training and testing.
-
Loss weights — DynamicObject
A DynamicObject mapping the output names of the neural network to scalar coefficients to weight the loss contributions to the final loss. The loss value that will be minimized by the model will then be the weighted sum of all individual losses.
-
Batch size — Integer
Number of samples per gradient update.
-
Epochs — Integer
Number of epochs to train the model. An epoch is an iteration over the entire Training X and Training Y data provided.
-
Validation split — Float
Between 0 and 1. Fraction of the training data to be used as validation data. The model will set apart this fraction of the training data, will not train on it, and will evaluate the loss and any model metrics on this data at the end of each epoch. The validation data is selected from the last samples in the x and y data provided, before shuffling. Note the fact that the validation loss of data provided using Validation split is not affected by regularization layers like noise and dropout.
-
Validation X — Tensor
Input data on which to evaluate the loss and any model metrics at the end of each epoch. The model will not be trained on this data. Note the fact that the validation loss of data provided using Validation X is not affected by regularization layers like noise and dropout. Validation X will override Validation split.
-
Validation Y — DynamicObject
Output data on which to evaluate the loss and any model metrics at the end of each epoch. The model will not be trained on this data.
-
Shuffle — String
When to shuffle the training data.
-
Validation frequency — Integer
Specifies how many training epochs to run before a new validation run is performed, e.g. Validation frequency = “2” runs validation every 2 epochs, Only relevant if validation data is provided.
Outputs
-
History — Tensor
A record of training loss values and metrics values at successive epochs, as well as validation loss values and validation metrics values (if applicable).
-
Loss — Float
Training loss of the model after the training, taking all outputs into account.
-
Loss of each output — DynamicObject
A DynamicObject mapping the output names to corresponding individual training loss (Float) after the training.
-
Metric values — DynamicObject
A DynamicObject mapping metric names to their corresponding value (Float) on the training data after the training.
-
Validation loss — Float
Validation loss of the model after the training, taking all outputs into account.
-
Validation loss of each output — DynamicObject
A DynamicObject mapping the output names to corresponding individual validation loss (Float) after the training.
-
Validation metric values — DynamicObject
A DynamicObject mapping metric names to their corresponding value (Float) on the validation data after the training.
-
Model — DynamicObject
The trained model.