Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Last active December 31, 2017 15:45
Show Gist options
  • Save ArnoutDevos/9c71c0114ebfa4f83ac2d74711e53f6d to your computer and use it in GitHub Desktop.
Save ArnoutDevos/9c71c0114ebfa4f83ac2d74711e53f6d to your computer and use it in GitHub Desktop.
def step_forward(self, x, prev_h):
next_h = np.tanh(x.dot(self.params[self.wx_name]) + prev_h.dot(self.params[self.wh_name]) + self.params[self.b_name])
meta = [x, prev_h, next_h]
return next_h, meta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment