41. What Is a Neural Network (Simple Explanation)
41.3 Forward Pass in Plain Words
41.3 Forward pass — सोप्या शब्दात
Flow बघा: X → weights → activation → next layer → ŷ.
हे का शिकायचं?
Why. Flow स्पष्ट हवं: X → weights → activation → next layer → ŷ.
हे काय आहे?
What. Tiny 2→2→1 network मध्ये प्रत्येक connection ला weight असतो. Forward pass = inputs पासून outputs काढणे. Learning नंतर loss + gradients ने weights बदलते.
कसं करायचं?
How.
एक forward pass शब्दात trace करा
- दोन numbers द्या (उदा. scaled litres, distance).
- Hidden layer दोन नवीन numbers बनवते.
- Output layer एक score देते (मग कदाचित probability).
- True label शी compare करा — तो error learning चालवतो (Chapters 42–43).
def relu(z):
return max(0.0, z)
# Fixed toy weights — intuition only
h1 = relu(0.5*1.2 + 0.2*0.3 + 0.1)
h2 = relu(-0.3*1.2 + 0.7*0.3 + 0.0)
y_hat = 0.6*h1 + -0.2*h2 + 0.05
print("hidden:", h1, h2, "output:", round(y_hat, 3))
Fictional numbers. इथले weights example साठी आहेत, arithmetic दिसावे म्हणून. Real nets data वरून learn करतात.
Weights here are made up so you can see the arithmetic. Real nets learn them from data.