Created
April 2, 2019 20:06
-
-
Save JoshVarty/03e55e39c0fda828c08c6d8730c81368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RNN: | |
# ... | |
def step(self, x): | |
# update the hidden state | |
self.h = np.tanh(np.dot(self.W_hh, self.h) + np.dot(self.W_xh, x)) | |
# compute the output vector | |
y = np.dot(self.W_hy, self.h) | |
return y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment