Stops the training process if it is currently running, and resets the training state.
Sets the number of epochs to train the model. 0 means train indefinitely.
Starts the training process.
Stop any ongoing training. The current epoch will be completed before stopping.