5.6.11 · HinglishMachine Learning (Aerospace Applications)

Convolutional neural networks — convolution operation, pooling

1,642 words7 min readRead in English

5.6.11 · Coding › Machine Learning (Aerospace Applications)


1. The Convolution Operation

YEH HAI KYA

YEH KAAM KYUN KARTA HAI — scratch se derive karo

Ek fully-connected layer se shuru karo: har output unit . Ek image jo ek hidden layer ko feed kar rahi hai, usmein weights hote hain. Do problems hain:

  1. Koi spatial prior nahi — pixel aur ko independent weights milte hain, isliye net yeh "jaan" nahi sakta ki nearby pixels zyada matter karte hain.
  2. Koi reuse nahi — ek location par seekha gaya feature har jagah dobara seekhna padega.

par do constraints lagao:

  • Locality: unless , ke ek chhote neighbourhood mein ho.
  • Weight sharing: same weights har output ke liye use hote hain.

Inn constraints ko mein substitute karne par giant matrix ek single tiny kernel mein collapse ho jaata hai jo image ke upar slide karta hai — aur convolution formula upar wala nikal aata hai. Convolution sirf ek constrained fully-connected layer hai. Yahi hai WHY.

OUTPUT SIZE KYUN CHHOTA HOTA HAI

Figure — Convolutional neural networks — convolution operation, pooling

Channels

Real images mein channels hote hain (RGB, ya stacked physics fields). Tab ek filter hota hai; tum channels ke upar bhi sum karte ho. filters ke saath output mein channels hote hain. Parameters .


2. Pooling


3. Common Mistakes (Steel-manned)


4. Flashcards

Kaun se do constraints ek fully-connected layer ko convolution mein badal dete hain?
Locality (weights sirf ek chhote neighbourhood mein nonzero hain) aur weight sharing (same weights har position par).
Conv/pool layer ke liye output-size formula
.
Output-size formula mein kyun aata hai?
Yeh kernel ki starting position 0 ko, uske baad ke strided positions ke alaawa, count karta hai.
Conv layer mein kitne learnable parameters hote hain (F filters, k×k, C channels)?
, jahan har filter ka bias hai; image size se independent.
Kya pooling mein learnable parameters hote hain?
Nahi — yeh ek fixed max/average function hai.
Pooling use karne ke do reasons batao.
Local translation invariance aur dimensionality reduction (receptive field bhi bada hota hai).
CNN mein kernel flipping kyun matter nahi karta?
Kernel weights seekhe jaate hain, isliye network simply flipped values seekh leta hai.
Weight sharing CNN ko kya property deta hai?
Translation equivariance — same feature position ki parwah kiye bina detect hota hai.
Output size compute karo: input 32, kernel 5, pad 2, stride 1.
(padding size preserve karta hai).
Max-pool vs average-pool intuition?
Max sabse strong "feature present hai?" signal rakhta hai; average smooth/overall magnitude retain karta hai.

Recall Feynman: 12-saal ke bachche ko explain karo

Socho tumhare paas ek chhoti stamp hai jis par ek pattern bana hai, aur stickers ki ek badi sheet hai. Tum same stamp ko poori sheet par dabate ho aur mark karte ho jahan bhi pattern match karta hai — yeh stamping convolution hai, aur ek hi stamp ko har jagah use karne ka matlab hai ki tumhe har spot ke liye alag rule yaad nahi karna. Phir tum marked sheet ko chhote squares mein dekhte ho aur, har square mein, sirf sabse loud mark rakhte ho — yahi max-pooling hai. Ab sheet chhoti hai aur tumhe abhi bhi yaad hai ki kahan kaisi cheezein hain, chahe woh thodi si hil bhi gayi hon. Bahut sari stamps aur shrinks stack karo, aur computer wing mein cracks ya sky se runways recognize karna seekh jaata hai.

Connections

  • Fully-connected neural networks — conv iska ek constrained version hai.
  • Backpropagation — gradients conv (shared-weight sum) aur pooling (max argmax tak gradient route karta hai) ke through flow karte hain.
  • Feature maps and receptive fields
  • Padding and stride
  • Image classification for aerospace inspection — crack/defect detection.
  • Translation equivariance vs invariance

Concept Map

add locality

add

collapses into

collapses into

slides

gives

only 9 weights

produces

shrinks by

downsampled by

applied in

Fully-connected layer

Locality constraint

Weight sharing

Convolution operation

Small kernel K

Translation equivariance

Parameter reduction

Output feature map S

Output size formula

Pooling

Aerospace uses crack detection