diff --git a/12_nlp_dive.ipynb b/12_nlp_dive.ipynb index 8ebfd2b..8b68303 100644 --- a/12_nlp_dive.ipynb +++ b/12_nlp_dive.ipynb @@ -1614,14 +1614,14 @@ "\n", " def forward(self, input, state):\n", " h,c = state\n", - " h = torch.stack([h, input], dim=1)\n", + " h = torch.cat([h, input], dim=1)\n", " forget = torch.sigmoid(self.forget_gate(h))\n", " c = c * forget\n", " inp = torch.sigmoid(self.input_gate(h))\n", " cell = torch.tanh(self.cell_gate(h))\n", " c = c + inp * cell\n", " out = torch.sigmoid(self.output_gate(h))\n", - " h = outgate * torch.tanh(c)\n", + " h = out * torch.tanh(c)\n", " return h, (h,c)" ] }, @@ -2362,4 +2362,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}