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

关于训练时添加验证集进行验证 #18

Closed
todesti2 opened this issue Jul 31, 2023 · 6 comments
Closed

关于训练时添加验证集进行验证 #18

todesti2 opened this issue Jul 31, 2023 · 6 comments

Comments

@todesti2
Copy link

您好,请问一下该如何在训练时添加验证集进行验证呢?我想知道自己训练的时候有没有过拟合

@lyuwenyu
Copy link
Owner

lyuwenyu commented Jul 31, 2023

训练加上 --eval 变训练变eval就可以吧


star this repo, keep following trends
image

@todesti2
Copy link
Author

训练加上 --eval 变训练变eval就可以吧

星标此存储库,继续关注趋势 image

是加上了的,但是它输出的loss值,不是训练集的值嘛,我想知道验证集的loss值

@lyuwenyu
Copy link
Owner

lyuwenyu commented Jul 31, 2023

这个目前的代码逻辑是不支持的 得改改代码

  1. 改模型 这里只有 self.training == Trueloss
    https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/heads/detr_head.py#L379
    https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/architectures/detr.py#L77

  2. 或者在trainer.py里的eval阶段强制 model.train()

@todesti2
Copy link
Author

这个目前的代码逻辑是不支持的 得改改代码

  1. 改模型 这里只有 self.training == Trueloss
    https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/heads/detr_head.py#L379
    https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/architectures/detr.py#L77
  2. 或者在trainer.py里的eval阶段强制 model.train()
    难怪!听你这么一说我就敢下手了哈哈哈。谢谢您的建议!我这就去试试

@lyuwenyu
Copy link
Owner

很稳, 可以star一下项目😬 有问题持续反馈

@todesti2
Copy link
Author

很稳, 可以star一下项目😬 有问题持续反馈

好的!

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