Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resume掉精度问题该怎么解决呢? #10

Closed
diaoa1900 opened this issue Sep 22, 2022 · 1 comment
Closed

resume掉精度问题该怎么解决呢? #10

diaoa1900 opened this issue Sep 22, 2022 · 1 comment

Comments

@diaoa1900
Copy link

您好,我在使用您的代码时发现--resume时精度会下降,并且可能需要训练一些epoch才能恢复到之前的精度,请问该如何做才能做到resume时不掉精度呢(因为AIstudio的GPU每天只有8点算力卡,我所使用的数据集训练一个epoch需要一个小时,只能通过resume来完成整个训练过程)
image

图中的第一个39-45是直接resume的结果

图中的第二个39-48是我认为之前训练时x['learning_rate']和x['momentum']存在,所以尝试在训练开始前给它们赋上warmup结束时的值,但发现效果并未达到预期
for j, x in enumerate(optimizer._param_groups):
x['learning_rate'] = np.interp(nw, [0, nw], [hyp['warmup_bias_lr'] if j == 2 else 0.0, scheduler.base_lr * lf(epoch)])
if 'momentum' in x:
x['momentum'] = np.interp(nw, [0, nw], [hyp['warmup_momentum'], hyp['momentum']])

希望能得到您的帮助,谢谢!

@GuoQuanhao
Copy link
Owner

本次实现了重大更新,你试试新版本。本次更新实现了yolov5的全新迁移,能够实现分类、分割、检测和各种格式模型的导出。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants