Model Pipeline - Activation functions
This pipeline shows how activation functions help a neural network learn by adding non-linear behavior. They transform the data after each layer so the model can understand complex patterns.
This pipeline shows how activation functions help a neural network learn by adding non-linear behavior. They transform the data after each layer so the model can understand complex patterns.
Loss
0.7 |****
0.6 |***
0.5 |**
0.4 |*
0.3 |*
+-----
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.65 | 0.60 | Loss starts high, accuracy is low as model begins learning |
| 2 | 0.50 | 0.72 | Loss decreases, accuracy improves as activations help model learn |
| 3 | 0.40 | 0.80 | Model learns better patterns, activation functions enable non-linear learning |
| 4 | 0.35 | 0.85 | Loss continues to drop, accuracy rises steadily |
| 5 | 0.30 | 0.88 | Training converges, activation functions help model capture complex data |
x using NumPy?print(output)?
import numpy as np x = np.array([-2, 0, 3]) output = 1 / (1 + np.exp(-x)) print(output)
import numpy as np
def tanh(x):
return (np.exp(x) - np.exp(-x)) / (np.exp(x) + np.exp(x))
print(tanh(1))Pass the test and this pattern moves unknown