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

关于models中LSTM参数初始化部分 #1

Open
mz2sj opened this issue Jan 18, 2020 · 1 comment
Open

关于models中LSTM参数初始化部分 #1

mz2sj opened this issue Jan 18, 2020 · 1 comment

Comments

@mz2sj
Copy link

mz2sj commented Jan 18, 2020

nn.init.orthogonal_(getattr(self.rnn, f'weight_hh_l{i}')) nn.init.kaiming_normal_(getattr(self.rnn, f'weight_ih_l{i}')) nn.init.constant_(getattr(self.rnn, f'bias_hh_l{i}'), val=0) nn.init.constant_(getattr(self.rnn, f'bias_ih_l{i}'), val=0) getattr(self.rnn, f'bias_hh_l{i}').chunk(4)[1].fill_(1)
想请教下博主参数初始化这部分,这里对weight和bias的初始化是对LSTM中各个门和候选记忆细胞所有参数的初始化吗?最后一句getattr(self.rnn, f'bias_hh_l{i}').chunk(4)[1].fill_(1)是什么意思呢?

@mz2sj
Copy link
Author

mz2sj commented Jan 21, 2020 via email

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

1 participant