摘要:
1 import matplotlib.pyplot as plt 2 import numpy as np 3 # 生成x数据 4 x = np.linspace(-10,10,100) 5 y = np.tanh(x) 6 plt.plot(x,y) 7 plt.show() 阅读全文
摘要:
1 import numpy as np 2 import matplotlib.pyplot as plt 3 def sigmoid(x): 4 return 1.0/(1+np.exp(-x)) 5 x = np.arange(-10,10,step = 1)# 生成一个numpy数组 6 f 阅读全文