July 2018
Intermediate to advanced
474 pages
13h 37m
English
This section walks through the steps to create a sigmoid derivative function.
def sigmoid_derivative(x): return sigmoid(x) * (1-sigmoid(x))
plt.figure(figsize=(6, 4), dpi= 75)plt.axis([-10,10,-0.25,1.2])plt.grid()X = np.arange(-10,10,1)Y = sigmoid(X)Y_Prime = sigmoid_derivative(X)c=plt.plot(X, Y, label="Sigmoid",c='b')d=plt.plot(X, Y_Prime, marker=".", label="Sigmoid Derivative", c='b')plt.title('Sigmoid vs Sigmoid Derivative')plt.xlabel('X')plt.ylabel('Y')plt.legend()plt.show()
Read now
Unlock full access