SaveTrainedModelHelper
The object wraps the logic on a given model training up to particular accuracy on a test dataset and then persist it in a file.
Constructors
SaveTrainedModelHelper
Link copied to clipboard
fun SaveTrainedModelHelper(trainBatchSize: Int = 500, testBatchSize: Int = 1000)
Content copied to clipboard
Functions
trainAndSave
Link copied to clipboard
fun trainAndSave(train: Dataset, test: Dataset, model: Sequential, path: String, accuracyThreshold: Double = 0.7)
Content copied to clipboard
Train model on train dataset and evaluate accuracy on test dataset until accuracyThreshold is reached then saves model to the folder path.