YOLO early stopping not running off epochs

21 views (last 30 days)
Does the ValidationPatience option in trainingOptions() go by epocs or iterations? I am trying to implement early stopping into my YOLO V4 learning, and it seems to be by iterations, and stopping at a selected number. For example, ValidationPatience = 800, it will stop at the 800th iteration, even though the validation loss is not increasing.
Any help on how to implement early stopping into YOLO
  1 Comment
Reece Pene
Reece Pene on 15 Dec 2022
Edited: Reece Pene on 15 Dec 2022
I have the same issue. Matlab isnt allowing the training to stop according to the validation patience. Instead it stops at a certain iteration.
Hope someone fixes this. It might be an error on the yolov4 training function.

Sign in to comment.

Answers (1)

Vidip Jain
Vidip Jain on 20 Mar 2023
The “ValidationPatience” option in “tainingOptions()” goes by epochs, not iterations. The patience value determines the number of epochs to wait before stopping training when the validation loss has stopped improving. If the validation loss does not improve for the specified number of epochs, the training stops early.
In your case, it sounds like you are using a custom implementation of early stopping based on the number of iterations rather than epochs. You may want to modify your code to use a patience value based on epochs instead, which will give you more consistent results across different training configurations. You can calculate the number of iterations for a given epoch by multiplying the number of iterations per epoch by the epoch number.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!