Derivation and extreme value of sigmoid function (the most detailed in history)

In machine learning and deep learning, the activation function sometimes uses the Sigmoid function.

This article will introduce in detail:

  • Use python package matplotlib to draw Sigmoid function graph
  • Sigmoid function detailed derivation process
  • Two methods of seeking extreme value of Sigmoid function

Sigmoid function:
Insert picture description here

One, use the python package matplotlib to draw the Sigmoid function graph

1. The python code for drawing Sigmoid graphics is as follows:
import numpy as np
import matplotlib.pyplot as plt

def sigmoid(x):
    return 1/(1+np.exp(-x))

x = np.arange(-5., 5., 0.2)
y = sigmoid(x)

plt.grid(True)
plt.plot(x, y)
2. The effect of python drawing Sigmoid graphics is as follows:

Insert picture description here

Second, the detailed derivation process and extreme value of the Sigmoid function

Insert picture description here

Guess you like

Origin blog.csdn.net/TFATS/article/details/109804139