Sigmoid Prime Python
class Sigmoid:
def __call__(self, z):
"""
Compute the sigmoid of z
Arguments:
z -- scalar or numpy array of any size.
Return:
sigmoid(z)
"""
sigmoid = 1/np.exp(-z)
return sigmoid
def prime(self, z): # Questions need some help --- Thanks!
"""
Compute the derivative of sigmoid of z
Arguments:
z -- scalar or numpy array of any size.
Return:
Sigmoid prime
"""
###return sigmoid * (1 - sigmoid)
Mid-ager