In [25]:
def sigmoid(z):
    return 1. / (1 + np.exp(-z))


def relu(z):
    return z * (z > 0)