public interface TrainingConfig
Trainer.
A Trainer requires an Initializer to initialize the parameters of the model,
an Optimizer to compute gradients and update the parameters according to a Loss
function. It also needs to know the TrainingMetrics that need to be computed during
training. A TrainingConfig instance that is passed to the Trainer will provide
this information, and thus facilitate the training process.
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize()
Gets the batch size that must be used during training.
|
Device[] |
getDevices()
Gets the
Device that are available for computation. |
Initializer |
getInitializer()
Gets the
Initializer to initialize the parameters of the model. |
Loss |
getLossFunction()
Gets the
Loss function to compute the loss against. |
Optimizer |
getOptimizer()
Gets the
Optimizer to use during training. |
java.util.List<TrainingMetric> |
getTrainingMetrics()
Returns the list of
TrainingMetric that should be computed during training. |
Device[] getDevices()
Device that are available for computation.
This is necessary for a Trainer as it needs to know what kind of device it is
running on, and how many devices it is running on.
DeviceInitializer getInitializer()
Initializer to initialize the parameters of the model.InitializerOptimizer getOptimizer()
Optimizer to use during training.OptimizerLoss getLossFunction()
Loss function to compute the loss against.Loss functionjava.util.List<TrainingMetric> getTrainingMetrics()
TrainingMetric that should be computed during training.TrainingMetricint getBatchSize()