From 59ed47cf9e9af92b7d8c73c69e475e71e815d67d Mon Sep 17 00:00:00 2001 From: Gowri Shankar Date: Thu, 5 Oct 2017 01:47:57 +0530 Subject: [PATCH] Errors in RNN forwardProp method fixed --- LSTM Demo.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LSTM Demo.ipynb b/LSTM Demo.ipynb index 6f131c4..a5d87ad 100644 --- a/LSTM Demo.ipynb +++ b/LSTM Demo.ipynb @@ -161,9 +161,9 @@ " \n", " #lets apply a series of matrix operations to our input (curr word) to compute a predicted output (next word)\n", " def forwardProp(self):\n", - " for i range(1, self.rl+1):\n", + " for i in range(1, self.rl+1):\n", " self.LSTM.x = np.hstack((self.ha[i-1], self.x))\n", - " cs, hs, f, c, o = self.LSTM.forwardProp()\n", + " cs, hs, f, inp, c, o = self.LSTM.forwardProp()\n", " #store computed cell state\n", " self.ca[i] = cs\n", " self.ha[i] = hs\n", @@ -171,7 +171,7 @@ " self.ai[i] = inp\n", " self.ac[i] = c\n", " self.ao[i] = o\n", - " self.oa[i] self.sigmoid(np.dot(self.w, hs))\n", + " self.oa[i] = self.sigmoid(np.dot(self.w, hs))\n", " self.x = self.eo[i-1]\n", " return self.oa\n", " \n",