-
Notifications
You must be signed in to change notification settings - Fork 90
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
想请教以下用3D动态卷积的时候报错问题 #5
Comments
要不贴下你完整的代码 |
下面是我的完整代码:我是用来学一下动态卷积,所以只是产生了一个随机的tensor来理解代码 这是你的源码,问题应该是出在这 |
Nan的话,按照2d里面的torch.randn改一下 |
好的,非常感谢 |
代码改好了,你帮我改了个bug😁 |
😁 |
您好 我在3d里面也遇到的output为nan的情况 请问您是改了哪行代码? |
这个源代码的作者已经把这个bug改过来了,你直接用现有的代码就可以了
…------------------ 原始邮件 ------------------
发件人: "kaijieshi7/Dynamic-convolution-Pytorch" ***@***.***>;
发送时间: 2021年5月12日(星期三) 下午2:56
***@***.***>;
***@***.******@***.***>;
主题: Re: [kaijieshi7/Dynamic-convolution-Pytorch] 想请教以下用3D动态卷积的时候报错问题 (#5)
您好 我在3d里面也遇到的output为nan的情况 请问您是改了哪行代码?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
我用的就是作者现在的代码 发现还是会输出nan 我把bias设置为Falsej就好了。 |
很感谢你的分享,但是我在调试过程中发现当输入为(128,1,20,30,30)这个tensor的通道为1时,代码会报错,
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\modules\conv.py", line 557, in init
super(Conv3d, self).init(
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\modules\conv.py", line 83, in init
self.reset_parameters()
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\modules\conv.py", line 86, in reset_parameters
init.kaiming_uniform_(self.weight, a=math.sqrt(5))
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\init.py", line 381, in kaiming_uniform_
fan = _calculate_correct_fan(tensor, mode)
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\init.py", line 350, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "D:\anaconda3\envs\py38\lib\site-packages\torch\nn\init.py", line 282, in _calculate_fan_in_and_fan_out
receptive_field_size = tensor[0][0].numel()
IndexError: index 0 is out of bounds for dimension 0 with size 0
The text was updated successfully, but these errors were encountered: