fit

fun fit(dataset: Dataset, epochs: Int = 5, batchSize: Int = 32, callback: 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).

callback

Callback to be used during training phase.

abstract fun fit(dataset: Dataset, epochs: Int = 5, batchSize: Int = 32, callbacks: List<Callback> = listOf()): 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.

fun fit(trainingDataset: Dataset, validationDataset: Dataset, epochs: Int = 5, trainBatchSize: Int = 32, validationBatchSize: Int = 256, callback: 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).

callback

Callback to be used during training phase.

abstract fun fit(trainingDataset: Dataset, validationDataset: Dataset, epochs: Int = 5, trainBatchSize: Int = 32, validationBatchSize: Int = 256, callbacks: List<Callback> = listOf()): 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.

fun fit(dataset: OnHeapDataset, validationRate: Double, epochs: Int, trainBatchSize: Int, validationBatchSize: Int, callback: Callback): TrainingHistory

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

Return

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

Parameters

dataset

The dataset that combines input data (X) and target data (Y). It will be split on train and validation sub-datasets.

validationRate

Number between 0.0 and 1.0. The proportion of validation data from initially passed dataset.

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.

callback

Callback to be used during training phase.

fun fit(dataset: OnHeapDataset, validationRate: Double, epochs: Int, trainBatchSize: Int, validationBatchSize: Int, callbacks: List<Callback> = listOf()): TrainingHistory

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

Return

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

Parameters

dataset

The dataset that combines input data (X) and target data (Y). It will be split on train and validation sub-datasets.

validationRate

Number between 0.0 and 1.0. The proportion of validation data from initially passed dataset.

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.

callbacks

Callbacks to be used during training phase.