Skip to content

Instantly share code, notes, and snippets.

@farma11
Created February 3, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farma11/9d37d4dd3f1317d0d80a5cd8ea29b64d to your computer and use it in GitHub Desktop.
Save farma11/9d37d4dd3f1317d0d80a5cd8ea29b64d to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pylab as plt
def sigmoid(x):
return 1 / (1 + np.exp(-x))
x = np.arange(-5.0, 5.0, 0.1) # -5.0から5.0まで0.1刻みで生成
y = sigmoid(x)
plt.plot(x, y)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment