- 博客(1)
- 收藏
- 关注
原创 pytorch初始化RNN权重的方法
RNN的weight和bias封装在parameters中,且需要对weight和bias分开初始化,否则会报如下错误! Fan in and fan out can not be computed for tensor with fewer than 2 dimensions 在模型定义的__init__函数中进行初始化: self.rnn = nn.LSTM(input_size=embedding_size, hidden_size=128, num_layers=1, bidirectional=F
2020-10-17 21:09:53
3690
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅