recurrent-batch-normalization-pytorch icon indicating copy to clipboard operation
recurrent-batch-normalization-pytorch copied to clipboard

Bi-direction; weight in line 281 is not defiended

Open h-jia opened this issue 6 years ago • 2 comments

Thanks very much for releasing the code! Great job!

However I have met two questions during lingering the code. 1.How to realise Bi-Direnctional BathNormLSTM? 2.The weight in line 281 and 282 in bnlstm.py has not been defined. I have changed it into several ways of define but failed, any suggestions? specifically, the code: if hx is None: hx = (Variable(nn.init.xavier_uniform(weight.new(self.num_layers, batch_size, self.hidden_size))), Variable(nn.init.xavier_uniform(weight.new(self.num_layers, batch_size, self.hidden_size))))

h-jia avatar Nov 07 '18 21:11 h-jia

@h-jia hello I have also met the same problem, have you solved this problem

songtaoshi avatar Nov 23 '18 12:11 songtaoshi

@songtaoshi Here is my implementation to be compatible with Pytorch 1.0.

h-jia avatar Jan 04 '19 05:01 h-jia