fit

open override fun fit(trainingDataset: Dataset, validationDataset: Dataset, epochs: Int, trainBatchSize: Int, validationBatchSize: Int, callbacks: List<Callback>): TrainingHistory

Trains the model for a fixed number of epochs (iterations over a dataset).

Return

A TrainingHistory object. It contains records with training/validation loss values and metrics per each batch and epoch.

Parameters

trainingDataset

The train dataset that combines input data (X) and target data (Y).

validationDataset

The validation dataset that combines input data (X) and target data (Y).

epochs

Number of epochs to train the model. An epoch is an iteration over the entire x and y data provided.

trainBatchSize

Number of samples per gradient update.

validationBatchSize

Number of samples per validation batch. True (default) = optimizer variables are initialized at the beginning of the training phase. False = optimizer variables are not initialized during training phase. It should be initialized before (via transfer learning).

callbacks

Callbacks to be used during training phase.

open override fun fit(dataset: Dataset, epochs: Int, batchSize: Int, callbacks: List<Callback>): TrainingHistory

Trains the model for a fixed number of epochs (iterations over a dataset).

Return

A TrainingHistory object. Its TrainingHistory.batchHistory attribute is a record of training loss values and metrics values per each batch and epoch.

Parameters

dataset

The train dataset that combines input data (X) and target data (Y).

epochs

Number of epochs to train the model. An epoch is an iteration over the entire x and y data provided.

batchSize

Number of samples per gradient update. True (default) = Weights are initialized at the beginning of the training phase. False = Weights are not initialized during training phase. It should be initialized before (via transfer learning or init() method call).

callbacks

Callbacks to be used during training phase.