diff --git a/12_4_hello_rnn_emb.py b/12_4_hello_rnn_emb.py index 3ab2098..1603ad6 100644 --- a/12_4_hello_rnn_emb.py +++ b/12_4_hello_rnn_emb.py @@ -38,7 +38,7 @@ def forward(self, x): # Initialize hidden and cell states # (num_layers * num_directions, batch, hidden_size) h_0 = Variable(torch.zeros( - self.num_layers, x.size(0), self.hidden_size)) + num_layers, x.size(0), hidden_size)) emb = self.embedding(x) emb = emb.view(batch_size, sequence_length, -1)