-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
I was trying to run this code but got this error. See pic below #19
Comments
@huntingingit 请问您的问题有得到解决吗 我也遇到了同样的问题,如果解决了的话,能否告知一下方法 |
如果你这么改了确实可以改变0除问题,但是会发现分类结果是33%(总共就3个类别,这1/3的准确率不就是猜的嘛)。我认为本这个代码本质的原因还是他的随意用了很多view操作,打乱了数据,刚好主要胶囊的数量太多,又多又乱的数据导致了模型学不出有用的东西,b都是非常小的数,现梯度消失的问题。 我的建议是参考他的框架,函数的实现还是自己写比较好。 可以一起交流呀,QQ:1038774332 |
谢谢你能这么详细回答我的问题qwq
因为最近在考试周也没太有时间再仔细看看论文和代码,如果有机会考完试之后可以详细交流一下吗?
因为刚刚开始科研方面的研究,也不是特别懂应该怎么做,有一种两眼一抹黑的感觉
qq:1104169527
发自我的iPhone
…------------------ Original ------------------
From: Seaton <[email protected]>
Date: Sat,Dec 19,2020 3:56 PM
To: benedekrozemberczki/CapsGNN <[email protected]>
Cc: TTTiko <[email protected]>, Comment <[email protected]>
Subject: Re: [benedekrozemberczki/CapsGNN] I was trying to run this code but got this error. See pic below (#19)
@huntingingit 请问您的问题有得到解决吗 我也遇到了同样的问题,如果解决了的话,能否告知一下方法
解决表象的方式是这样的,首先squash函数那里,s = (mag_sq / (1.0 + mag_sq)) * (s / mag + 1e-8) 添加个1e-8, 然后在动态路由方法里给b做一个归一化b_max = torch.max(b_ij, dim=2, keepdim=True) ; b_ij = b_ij / b_max.values (这部分是其他人提出来的,实际上应该是放大b的值)
如果你这么改了确实可以改变0除问题,但是会发现分类结果是33%(总共就3个类别,这1/3的准确率不就是猜的嘛)。我认为本这个代码本质的原因还是他的随意用了很多view操作,打乱了数据,刚好主要胶囊的数量太多,又多又乱的数据导致了模型学不出有用的东西,b都是非常小的数,现梯度消失的问题。
我的建议是参考他的框架,函数的实现还是自己写比较好。
可以一起交流呀,QQ:1038774332
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The text was updated successfully, but these errors were encountered: