Skip to content

Remove automatic reset after compute() in the Metric's API? #4641

@oterobaguer

Description

@oterobaguer

🚀 Feature

a) Remove automatic reset after compute() in the Metric API.
b) Option to automatic log running averages instead of batch-wise results

Motivation

Some of the metrics normally used, such as 'Recall', 'Intersection over Union',... etc, make no sense if calculated for a small set of images. For example, in binary classification, a batch in which there is no positive case returns 0. However, running averages are much better in these cases. Lightning metrics are automatically reset after calling compute(). Why is this behavior? isn't better to allow calling compute() many times, allowing for example, to compute running averages in between. If at some point a reset is needed the reset() method can always be called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancementhelp wantedOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions