-
Notifications
You must be signed in to change notification settings - Fork 177
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 #26
Comments
please specify the experimental details |
我是将他加在了yolo网络上,将panet层的conv改成了involution,使用conv的时候不会nan,但是改成involution时出现了nan |
大佬,有啥办法可以解决吗,我试过将loss调低但是没什么用 |
You may try the gradient clipping method, which is also used sometimes when we train our detection models, for example, https://github.com/d-li14/involution/blob/main/det/configs/involution/retinanet_red50_neck_fpn_1x_coco.py#L8 |
thank you so much |
|
I replaced the conv in the resblock in the super resolution model "edsr" with involution, and i used the gradient method, but the loss is still inf. |
你现在解决了吗 |
还没有 |
我也没有,可以讨论讨论 |
请问一下你们现在解决了吗? |
The loss of mine in the training set is fine, while in cv set, some batches are nan. |
Maybe your dataset is not pure? |
I also met this problem in generation task. I replaced the con 3x3 by involution, the loss in nan or inf. |
我也没解决,所以我已经快要放弃使用involution了 |
|
I also tried the gradient clipping method too.But It didn't work.If you have any good methods, please share them, thank you |
I also met the same problem when dealing with the pose estimation task. |
ok |
I replace the standard conv with involution and added bn, then the loss seems normal.But the final result is worse than edsr baseline with bn layer,even though i added the parameters of the edsr-involution.Now i have given up. You can have a try and we can talk.@LJill |
Thanks for your reply . I tried your method on EDSR and RCAN , it works , the loss is normal now . I will conduct experiments to observe the final result . |
|
我换成involution,结果参数好像不能进行优化。train loss一直下降,但是val loss一直保持一个值没变。有大佬知道这是不是过拟合造成的,还是代码错误。 |
what cause this problem ?? I also met this issue. train loss is better, but the val loss is unchange. |
I implemented a pure PyTorch 2D involution and faced a similar issue of Nans occurring during training when using the involution as a plug-in replacement for convolutions. In my case this was caused by exploding activation. For me, the issue could be solved by utilizing a higher momentum (0.3) in the batch normalization (after reduction) layer. I guess the distribution of the activation change that much that batch norm, with |
我解决了我遇到的nan问题,附上我的解决方法,不知道是否适用于你们的:
I solved the nan problem I encountered, and attached my solution, I don’t know if it applies to yours:
|
when I use I meet
The text was updated successfully, but these errors were encountered: