attractivechaos / kann

A lightweight C library for artificial neural networks
Other
678 stars 117 forks source link

Adds SIGINT catching on training loop #51

Closed 7PintsOfCherryGarcia closed 2 years ago

7PintsOfCherryGarcia commented 2 years ago

With this commit, during training, a user can ctr-C to send SIGINT. The signal is caught and the looping variable is set to it's last valid value. This means that the training loop finishes it's current instance and exits normally.

With this commit, users can decide to interrupt the training process at any moment and till conserve the state of the model reached so far.

attractivechaos commented 2 years ago

A library shouldn't catch SIGINT.