5.6.7 · D1 · HinglishMachine Learning (Aerospace Applications)

FoundationsFeedforward network — forward pass

2,085 words9 min read↑ Read in English

5.6.7 · D1 · Coding › Machine Learning (Aerospace Applications) › Feedforward network — forward pass

Isse pehle ki tum forward pass note ki ek bhi line padho, tumhe kuch symbols ka matlab pehle se pata hona chahiye. Parent note unhe use karta hai; yahan hum unhe build karte hain, ek ek karke, us picture se jo woh represent karte hain. Agar tum neeche ki checklist pass kar sako, to parent note seedha English jaisa padhega.


1. Ek number aur numbers ki list (vector )

Sabse simple cheez se shuru karo: ek akela number, jaise airspeed . Ek sensor tumhe ek number deta hai.

Lekin ek airplane ke paas bahut saare sensors hote hain ek saath — airspeed, throttle, angle-of-attack. Un readings ko ek column mein stack karo, ek ke upar doosra. Yeh stack ek vector hai. Hum ise bold mein likhte hain, , yeh kehne ke liye ki "yeh ek poori list hai, sirf ek number nahi".

Figure dekho. Teen numbers teen stacked boxes ban jaate hain. Woh vertical stack hi ki picture hai. Uske paas wala symbol padha jaata hai " real numbers ki ek list" poori number line hai (koi bhi decimal, positive ya negative), aur superscript count karta hai ki list mein kitne slots hain. Toh ka matlab hai "teen real numbers stacked".

Subscripts ek slot pick karte hain. slot 1 mein wala number hai, slot 2 mein. Subscript list ke andar ek street address hai.


2. Numbers ka ek grid (weight matrix )

Ab, ek neuron ka poora point yeh hai ki input numbers ko mix karo — airspeed ka kuch, throttle ka kuch lo, add karo. "Kitna kaun sa" ek set of dials hai jise weights kehte hain.

Ek neuron jo 3 inputs pad raha hai use 3 dials chahiye. Agar 4 neurons hain, to humein dials chahiye. Un dials ko ek grid mein arrange karo: ek row per neuron, ek column per input. Woh grid ek matrix hai, bold aur capital mein likha: .

Picture ek grid dikhati hai. Red entry row 2, column 3 mein baithti hai. Hum ise name karte hain jahan (woh neuron jisme yeh feed hota hai) aur (woh input jahan se aata hai). Subscripts ko right-to-left padho: "input se neuron mein." Yeh ordering ulta lagta hai lekin yeh exactly wahi hai jo agle section mein matrix multiply kaam karta hai.


3. Matrix ko vector se multiply karna (core engine)

Yeh woh ek operation hai jis par poora forward pass tika hua hai. Hamare paas ek grid hai aur ek list , aur hum mixed result chahte hain.

Rule, shabdon mein: output slot mein number paane ke liye, matrix ki row par aur input list par ek saath chalo, pairs multiply karo, aur unhe add karo. Yeh "multiply-pairs-and-add" move dot product kehlata hai.

Figure mein red row follow karo. Us row ka har dial input column mein ek number ke saath line up hota hai. Har pair multiply karo (red arrows), phir teen products ka sum karo — woh akela sum output slot hai. Har row ke liye repeat karo aur tumne poori output list fill kar li.

Shape rule (yeh click yaad rakhna). Ek matrix times ek column, ek column deta hai. Inner numbers () match karne chahiye — isi liye matrix mein utne hi columns hain jitne input mein slots hain. Jab woh match karte hain, woh cancel ho jaate hain aur outer numbers output shape ke roop mein bache rehte hain.

Recall Shape check karo

hai, input hai. Output ki shape kya hai? Answer ::: — chaar numbers, ek per neuron.


4. Ek bias add karna (vector )

Ek weighted sum tab hi produce kar sakta hai jab inputs hoon. Lekin ek neuron ko input chahe kuch bhi ho, "pehle se lean on" ya "pehle se lean off" rehna pad sakta hai. Bias wahi built-in lean hai: har neuron ke sum mein add hone wala ek akela number.

Toh poora mixing step hai : mix karo, phir shift karo. Section 3 ki picture mein, bias bas ek extra number hai jo dot product ke baad har output slot mein daal diya jaata hai.


5. Bending curve (activation )

Agar network sirf hi karta raha, to layers stack karna bekar hota — ek bada grid wahi kaam kar sakta tha (parent note yeh collapse prove karta hai). Straight-line mixing sirf straight relationships draw kar sakti hai. Real aerospace behaviour (stall, shock) curved hota hai. Toh har mix ke baad hum numbers ko ek nonlinear function (Greek "sigma", lowercase) se bend karte hain.

Red ReLU curve negative inputs ke liye bilkul flat rehta hai (neuron "fire nahi karta") phir positives ke liye seedha line ki tarah rise karta hai. Black tanh curve aur par flatten hota hai chahe input kitna bhi bada ho — ek natural "confidence saturates" shape. Dono curves hain, lines nahi, aur isi liye woh exist karte hain.


6. Layers, aur superscript

Parent note , , likhta hai. Parentheses mein superscript ek layer label hai, power nahi. ka matlab hai "layer 1 ki activations", kabhi bhi " squared" nahi.


Yeh sab forward pass ko kaise feed karta hai

feeds next layer

Number and vector x

Matrix vector product

Weight matrix W

Pre-activation z equals Wa plus b

Bias vector b

Dot product and sum

Activation sigma bends z

Layer output a

Layer index ell

Final output y equals a at layer L

Ise top se bottom tak padho: numbers vectors bante hain, weights matrix bante hain, dono matrix–vector product mein milte hain, bias result shift karta hai, activation ise bend karta hai, aur woh output agli layer ka input ban jaata hai — last layer tak loop karta hai jo prediction return karta hai.


Equipment checklist

Right side dhako aur zor se jawab do. Agar koi bhi stumble kare, parent note kholne se pehle us section ko dubara padho.

Bold ka kya matlab hai aur uski shape kya hai?
Numbers ki ek ordered column list (ek vector); shape , ek slot per input feature.
kaise padha jaata hai?
" real numbers ki ek list" — number line hai, slots count karta hai.
mein, kaun sa index destination neuron hai?
(row) woh neuron hai jisme yeh feed hota hai; (column) woh input hai jahan se aata hai.
ki shape kya honi chahiye?
— rows = is layer mein neurons, columns = previous layer se inputs.
ka output slot kaise milta hai?
Row aur ka dot product: matching pairs multiply karo aur sum karo.
tumhe kya karne ka instruction deta hai?
ko 1 se tak run karne do, har product banao, aur sab add karo.
Multiply karte waqt shapes arbitrary kyun nahi ho sakti?
Matrix ka column count input ke slot count ke barabar hona chahiye; woh cancel hote hain, output shape bachi rehti hai.
Bias kis kaam aata hai?
Ek per-neuron shift jo weighted sum ke baad add hota hai, ek neuron ko zero input par bhi lean on/off karne deta hai.
Hum nonlinear kyun apply karte hain?
Bending ke bina, stacked layers ek straight-line map mein collapse ho jaate hain; nonlinear reality ke liye curves zaroori hain.
ReLU ek negative number ke saath kya karta hai?
Use par flatten karta hai (neuron fire nahi karta).
Kya mein ek power hai?
Nahi — yeh layer label karta hai; ka matlab hai "layer 1 ki activations".
kya hai?
Input khud, — taaki layer recursion uniformly shuru ho sake.