S形函数在神经网络中的作用导数
我试图了解S型函数的导数在神经网络中的作用。 首先,我绘制了sigmoid函数,并使用python定义了所有点。该衍生物的确切作用是什么? import numpy as np import matplotlib.pyplot as plt def sigmoid(x): return 1 / (1 + np.exp(-x)) def derivative(x, step): return (sigmoid(x+step) - sigmoid(x)) / step x = np.linspace(-10, 10, 1000) y1 = sigmoid(x) y2 = derivative(x, 0.0000000000001) plt.plot(x, y1, label='sigmoid') plt.plot(x, y2, label='derivative') plt.legend(loc='upper left') plt.show()