Untitled
unknown
python
16 days ago
482 B
3
Indexable
Never
import numpy as np import matplotlib.pyplot as plt def sigmoid(x): return 1 / (1+ np.exp(-x)) def sigmoid_vanishing(x): return sigmoid(x) * (1 - sigmoid(x)) x = np.linspace(-10,10,100) y = sigmoid(x) y_prime = sigmoid_vanishing(x) plt.figure(figsize = (10 , 6)) plt.plot(x,y,label = "sigmoid") plt.plot(x,y_prime,label = "sigmoid vanishing") plt.xlabel("x") plt.ylabel("y") plt.title("day la ham sigmoid va sigmoid vanishing") plt.legend() plt.grid(True) plt.show()
Leave a Comment