sigmoid函数 import matplotlib.pyplot as plt import numpy as np def sigmoid(x): return 1/(1+np.exp(-x)) def plot_sigmoid(): # param:起点,终点,间距 x = np.arange(-10, 10, 0.1) #起点,终点,间距 y = sigmoid(x) plt.plot(x, y) plt.show() if __name__ == '__main__': plot_sigmoid() 写在最后:若本文章对您有帮助,请点个赞啦 ٩(๑•̀ω•́๑)۶