gmihaila / ml_things

This is where I put things I find useful that speed up my work with Machine Learning. Ever looked in your old projects to reuse those cool functions you created before? Well, this repo is designed to be a Python Library of functions I created in my previous project that can be reused. I also share some Notebooks Tutorials and Python Code Snippets.
https://gmihaila.github.io
Apache License 2.0
245 stars 61 forks source link

Early Stopping #7

Closed bala1802 closed 2 years ago

bala1802 commented 3 years ago

Can you please add examples for earlystopping based on the loss metrics during the training?

gmihaila commented 3 years ago

Hi @bala1802 thank you for your question!

Here is a link form HuggingFace that let's you use early stopping: https://huggingface.co/transformers/main_classes/callback.html#transformers.EarlyStoppingCallback

Also, you could use PyTorchLightning: https://pytorch-lightning.readthedocs.io/en/latest/common/early_stopping.html

If there are enough people wanting this I can add it in the future.