Skip to content

Instantly share code, notes, and snippets.

@ImadDabbura
Created September 20, 2018 14:51
Show Gist options
  • Save ImadDabbura/c8ea80dc569514bf798e9bf5af972b63 to your computer and use it in GitHub Desktop.
Save ImadDabbura/c8ea80dc569514bf798e9bf5af972b63 to your computer and use it in GitHub Desktop.
def sigmoid(Z):
A = 1 / (1 + np.exp(-Z))
return A, Z
def tanh(Z):
A = np.tanh(Z)
return A, Z
def relu(Z):
A = np.maximum(0, Z)
return A, Z
def leaky_relu(Z):
A = np.maximum(0.1 * Z, Z)
return A, Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment