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

已经更新代码,解决了损失值为nan的问题,在kld损失中,分母部分加上了eps值避免loss值为0 #32

Open
yuxin7 opened this issue Aug 17, 2023 · 1 comment

Comments

@yuxin7
Copy link

yuxin7 commented Aug 17, 2023

          已经更新代码,解决了损失值为nan的问题,在kld损失中,分母部分加上了eps值避免loss值为0

Originally posted by @Egrt in #18 (comment)
我使用的3090显卡,训练参数如下:
Configurations:

| keys | values|

| classes_path | model_data/test.txt|
| anchors_path | model_data/yolo_anchors.txt|
| anchors_mask | [[6, 7, 8], [3, 4, 5], [0, 1, 2]]|
| model_path | |
| input_shape | [960, 960]|
| Init_Epoch | 0|
| Freeze_Epoch | 3|
| UnFreeze_Epoch | 500|
| Freeze_batch_size | 2|
| Unfreeze_batch_size | 8|
| Freeze_Train | False|
| Init_lr | 0.01|
| Min_lr | 0.0001|
| optimizer_type | sgd|
| momentum | 0.937|
| lr_decay_type | step|
| save_period | 5|
| save_dir | logs_gf1pms|
| num_workers | 8|
| num_train | 2740|
| num_val | 305|

从第一步开始loss就为nan,如果换成adam优化器,lr设置1e-3,训练3步出现nan。

@Egrt
Copy link
Owner

Egrt commented Aug 31, 2023

继续降低学习率,或者检查下数据集标注

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