Skip to content

Ignore Epochs #5971

@jinmc

Description

@jinmc

Search before asking

  • I have searched the YOLOv5 issues and found no similar feature requests.

Description

I have noticed that my training session always stop at 100.
When I see the results of fitness, the fitness is best at epoch= 2, so it is stopping at 100, because the default patience is 100.
This is the mAP pictures, after epoch 2, the fitness decreases drastically and starts to grow gradually.
I want a feature that ignores the fitness before certain epochs and then start to count to the patience.
For example, when I set the parameter for ignore_epochs to 40, even though the fitness hasn't increased from 0, the training will be held until 140, provided the patience is 100.

Use case

When training, especially using pretrained weights, there is a spike in the early stage of training.
I have seen this, and the only way to solve this is to manually set patience to large or not use patience.

This is when we can use ignore-epochs, so that the early epochs do not apply when counting patience.

Screenshot 2021-12-14 at 14-43-46 Weights Biases
Screenshot 2021-12-14 at 14-43-25 Weights Biases

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions