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

您的代码在定义self.gat_dep时直接用的list没有用nn.ModuleList,这导致self.gat_dep的参数不训练 #9

Open
xingbowen opened this issue Oct 30, 2020 · 1 comment

Comments

@xingbowen
Copy link

我发现您的代码在定义self.gat_dep时直接用的list没有用nn.ModuleList, 我查了一些文档,发现这会导致self.gat_dep的参数不会参与训练,只会参加forward计算。
于是我进行了实验,我在训练前后打印self.gat_dep的参数,发现没有变化,但是实验结果与您的论文中差不多。
请问在你那里运行时有没有这个情况?
为什么初始化self.gat_dep的参数后它的参数从未参与训练只参与了forward过程还能得到比较好的结果?

@xingbowen xingbowen changed the title 您的代码在定义self.gat_dep时直接用的list没有用nn.ModuleList 您的代码在定义self.gat_dep时直接用的list没有用nn.ModuleList,这导致self.gat_dep的参数不训练 Oct 30, 2020
@circle-hit
Copy link

我也想问同样的问题。但当我把代码中定义self.gat_dep时换成使用nn.ModuleList后,结果反而有所下降。

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