Created
January 10, 2020 10:08
-
-
Save Everfighting/e9423aea5176d44d7e01db724fbb4290 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
def sigmoid(x): | |
return 1. / (1. + np.exp(-x)) | |
x = np.arange(-10, 10, 0.1) | |
y = sigmoid(x) | |
plt.plot(x, y) | |
plt.axvline(0.0,ls = 'dotted', color='k') | |
plt.title(r'Sigmoid函数曲线', fontsize = 15) | |
plt.text(5,0.8,r'$y = \frac{1}{1+e^{-z}}$', fontsize = 18) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment