-
Notifications
You must be signed in to change notification settings - Fork 58
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 #36
Comments
学习率太高了吗?导致梯度爆炸? |
|
|
你好,你的问题可能有三种原因:
另外,我建议可以直接加载sceneflow的预训练模型,然后在自己的数据集上训练,避免重新训练造成的不稳定。 |
非常感谢!!我后来就是用的sceneflow预训练模型来训练的,并且学习率调成了之前的1/10,训练变稳定了! |
这是不正常的,我们训练的时候没有出现NAN
2023-11-02 14:40:03>1790426751 写道:
你好,我在复现论文时发现训练过程中会出现nan,所以我在代码中添加以下代码(图中画圈的)想要查看跑到第几个epoch时会出现nan。然后,我发现在训练一开始就有参数的梯度是nan,请问这是正常的吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
感谢您之前的回复,我还有一个小问题想要请教:就是关于训练参数--slow_fast_gru的设置,我看这个参数在前身RAFT-Stereo中说可以提高计算速度,但是在您的论文并没有提到这点,在代码中这参数也是默认为false的。请问这个参数我要设置为true还是保持默认就好? |
我觉得看你的需求,如果你想快一点,可以设置一下2023-11-03 09:54:08>1790426751 写道:
感谢您之前的回复,我还有一个小问题想要请教:就是关于训练参数--slow_fast_gru的设置,我看这个参数在前身RAFT-Stereo中说可以提高计算速度,但是在您的论文并没有提到这点,在代码中这参数也是默认为false的。请问这个参数我要设置为true还是保持默认就好?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
作者您好,我在sceneflow数据集上训练您的模型时,发现如果将lr设置为0.001,batchsize=2,然后跑到5k步左右的时候,3像素偏差会出现nan,我想咨询一下,如果batchsize设置只能是2的话,如果让网络可以快速下降,lr应该设置为多少呢 |
batchsize最好设置大一点,太小容易震荡容易出现nan,如果batchsize太小的话,试试梯度累计,将多个batch的loss求平均后再反向传播。或者把 core中的igev_stereo.py with autocast(enabled=self.args.mixed_precision): 改成enabled=False试试,我能想到的了,如果还不行,可能还是需要调整batchsize。2023-11-30 19:50:29>Wade_Lucky 写道:
作者您好,我在sceneflow数据集上训练您的模型时,发现如果将lr设置为0.001,batchsize=2,然后跑到5k步左右的时候,3像素偏差会出现nan,我想咨询一下,如果batchsize设置只能是2的话,如果让网络可以快速下降,lr应该设置为多少呢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
每次在训练到接近8K iterations的时候都会出现loss为Nan的情况,数据集里有自己业务的数据。
The text was updated successfully, but these errors were encountered: