Answers for "Sigmoid prime Python"

0

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)
Posted by: Guest on January-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language