TrainingControllerImpl

class TrainingControllerImpl(exerciseRepository: ExerciseRepository, trainingScope: CoroutineScope) : TrainingController

Constructors

Link copied to clipboard
constructor(exerciseRepository: ExerciseRepository, trainingScope: CoroutineScope)

Properties

Link copied to clipboard
open override val state: StateFlow<TrainingState>

Functions

Link copied to clipboard
open override fun reset()

Stops the training process if it is currently running, and resets the training state.

Link copied to clipboard
open override fun setEpochs(epochs: Int)

Sets the number of epochs to train the model. 0 means train indefinitely.

Link copied to clipboard
open override fun start()

Starts the training process.

Link copied to clipboard
open override fun stop()

Stop any ongoing training. The current epoch will be completed before stopping.

Link copied to clipboard
open suspend override fun test(case: Exercise): Double