Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoothing metrics during training for EarlyStopping and ReduceLROnPlateau callbacks #2498

Closed
diepala opened this issue Jun 5, 2021 · 1 comment

Comments

@diepala
Copy link

diepala commented Jun 5, 2021

Describe the feature and the current behavior/state.

Callbacks such as EarlyStopping and ReduceLROnPlateau monitor a specified metric (usually the validation loss) to activate their functionality. However, many times the metric value across the training epochs is quite noisy, specially with small datasets or models with stochastic layers (such as models with dropout, variational autoencoders...). This can cause EarlyStopping and ReduceLROnPlateau to be triggered prematurely, even with large patience, due to the presence of outliers. In fact, this is why the TensorBoard already implements a smoothing of the metrics.

My feature request is to make a metric wrapper that is able to smooth/filter any other metric. Then, the EarlyStopping and ReduceLROnPlateau can monitor the smoothed metric. A possible implementation can be found in this stackoverflow answer. What do you think about this?

Relevant information

  • Are you willing to contribute it (yes/no): yes, but I am new to contributing so I will need some help
    If you wish to contribute, then read the requirements for new contributions in CONTRIBUTING.md
  • Are you willing to maintain it going forward? (yes/no): yes
  • Is there a relevant academic paper? (if so, where): no
  • Does the relavent academic paper exceed 50 citations? (yes/no):
  • Is there already an implementation in another framework? (if so, where): no
  • Was it part of tf.contrib? (if so, where): no

Which API type would this fall under (layer, metric, optimizer, etc.)
Metric, alhtough it needs and auxiliary callback.

Who will benefit with this feature?
Anyone using EarlyStopping or ReduceLROnPlateau callbacks, and want to avoid premature or false triggers.

Any other info.

@seanpmorgan
Copy link
Member

TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision:
TensorFlow Addons Wind Down

Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA:
Keras
Keras-CV
Keras-NLP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants