Skip to content

ImageClassificationTrainer.EarlyStoppingMetric.Loss must have _bestMetricValue equal to Single.MaxValue in case of Loss metric #5938

@MiroslavKabat

Description

@MiroslavKabat

System Information:

  • Windows 10
  • ML.NET v1.6.0
  • .NET 5.0

Bug
ImageClassificationTrainer.EarlyStopping doesn't work with ImageClassificationTrainer.EarlyStoppingMetric.Loss

It stops training immediately after epoch is reaching patience.

I expect reason of that bug in line 250 in ImageClassificationTrainer.cs

_bestMetricValue = 0.0f; must be equal to Single.MaxValue in case of Loss metric and 0.0f for Accuracy metric.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions