How to stop training?

I’m trying to implement Early Stopping in pytorch. I want to know how to stop training when the early stopping criterion is met ? Is there any function that achieves this ?

Here you can find an implementation of early stopping. Maybe it can be useful for your use case.

2 Likes

Here is a simple implementation of early stopping. Hope this is helpful!