aai-institute / continuiti

Learning function operators with neural networks.
GNU Lesser General Public License v3.0
19 stars 3 forks source link

Add stopping criterion to `trainer.fit` method #70

Closed samuelburbulla closed 6 months ago

samuelburbulla commented 6 months ago

One should be able to stop training if a desired criterium is satisfied, e.g., if training loss is below a prescribed threshold. At the moment, we only support training for a fixed number of epochs.

Let us introduce a new parameter stopping_criterium that takes the current training status (like epoch, loss/train, etc.) and returns True/False if training should be stopped. Per default, we can set this criterion to loss/train < 1e-5.