Skip to content

Instantly share code, notes, and snippets.

@vascoosx
Created December 3, 2016 01:32
Show Gist options
  • Save vascoosx/05d3155af878dae1bb0cdbae57a1fcce to your computer and use it in GitHub Desktop.
Save vascoosx/05d3155af878dae1bb0cdbae57a1fcce to your computer and use it in GitHub Desktop.
from math import exp
def theta(k):
return 1.0/(1 + exp(-k))
def ht(wx, xt, uh, ht_m1, bh): return theta(wx * xt + uh * ht_m1 + bh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment