Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created March 10, 2018 14:07
Embed
What would you like to do?
import numpy as np
class RNN:
def step(self, x):
# Update the state
self.h = np.tanh(np.dot(self.W_hh, self.h) + np.dot(self.W_xh, x))
# Calculate the output
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