PaddlePaddle / PaddleRS

Awesome Remote Sensing Toolkit based on PaddlePaddle.
Apache License 2.0
365 stars 88 forks source link

early_stop的位置是否存在问题? #164

Closed YuQi9797 closed 11 months ago

YuQi9797 commented 11 months ago

https://github.com/PaddlePaddle/PaddleRS/blob/29eb76bbafc33c71d50cace17a6651f95fd131af/paddlers/tasks/base.py#L484C43-L484C43

early_stop中early_stop_patience应该是指定多少轮以后就停止训练, 但是early_stop是存在于if (i + 1) % save_interval_epochs == 0 or i == num_epochs - 1: 这个条件下, 这就导致要满足 save_interval_epochs 才能执行一次判断。 这就导致并不是按照early_stop_patience来执行early_stop吧? 有可能前几轮就已经满足条件了, 但无奈与 save_interval_epochs 条件的限制,只有在满足这个大条件的前提下才能early_stop。 所以这里的early_stop()位置是否存在问题?

lazyn1997 commented 11 months ago

看起来这一部分是没问题的,因为早停需要在验证集上的评价结果进行控制,而程序逻辑是在每一次保存前才进行eval,所以放到这个位置是没有问题的

YuQi9797 commented 11 months ago

奥奥奥,好的明白了! 谢谢!

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年7月12日(星期三) 中午11:02 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [PaddlePaddle/PaddleRS] early_stop的位置是否存在问题? (Issue #164)

看起来这一部分是没问题的,因为早停需要在验证集上的评价结果进行控制,而程序逻辑是在每一次保存前才进行eval,所以放到这个位置是没有问题的

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>