songyingxin / TextClassification

Pytorch + NLP, 一份友好的项目实践仓库
Other
457 stars 96 forks source link

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

Open mz2sj opened 4 years ago

mz2sj commented 4 years ago

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 commented 4 years ago

https://drive.google.com/file/d/1sRmt0ptcYs-6tCqiMnEcRY0Epa2xQaFC/view?usp=drivesdk

---原始邮件--- 发件人: "BlueSkyBubble"<notifications@github.com> 发送时间: 2020年1月21日(周二) 中午12:03 收件人: "songyingxin/TextClassification-Pytorch"<TextClassification-Pytorch@noreply.github.com>; 抄送: "mz2sj"<1576401831@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [songyingxin/TextClassification-Pytorch] 关于models中LSTM参数初始化部分 (#1)

/search/hadoop02/suanfa/songyingxin/data/embedding/glove/glove.840B.300d.txt 你好,这个文件可以分箱一下吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.