Created
April 2, 2019 20:06
-
-
Save JoshVarty/508bf0317447541b4c37cd797d574624 to your computer and use it in GitHub Desktop.
This file contains hidden or 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