Skip to content

Important Formula

graph TD
    Input[Input: 256x256x3] --> C1[Conv 3x3: 254x254x32]
    C1 --> C2[Conv 5x5: 250x250x64]
    C2 --> P1((Max Pool 2x2))
    P1 --> C3[125x125x64]
    C3 --> C4[Conv 3x3: 123x123x128]
    C4 --> C5[Conv 7x7: 117x117x256]
    C5 --> P2((Max Pool 3x3))
    P2 --> C6[58x58x256]
    C6 --> C7[Conv 3x3: 56x56x512]
    C7 --> C8[Conv 9x9: 48x48x1024]
    C8 --> P3((Max Pool 2x2))
    P3 --> Flatten[Flatten: 589,824]
    Flatten --> FC1[FC 2048]
    FC1 --> FC2[FC 4096]
    FC2 --> Out[Output: 50]

2. Core Formulas

A. Dimensionality (Spatial Shrinkage)

Used to determine if an image size (like 64x64 vs 256x256) is valid.

  • Convolution (Stride 1, No Padding):

    O=I−F+1

  • Max Pooling (Stride S):

    O=⌊I/S⌋

B. Learnable Parameters

  • Convolutional Layer:

    Params=[(F×F×Din​)+1]×Dout​

    (Note: +1 is for the bias term per filter)

  • Fully Connected (Dense) Layer:

    `Params=(InputUnits+1)×OutputUnits``


3. Logistic Regression (Binary Classification)

A. Model Equations

  • Sigmoid Activation:

    y^​=σ(z)=1+e−z1​

  • Binary Cross-Entropy (BCE) Loss:

  • $$J(w) = -\frac{1}{N} \sum_{i=1}^{N} [y_i \log(\hat{y}_i) + (1 - y_i) \log(1 - \hat{y}_i)]$$

B. Optimization (Gradient Descent)

  • Weight Gradient: $$ ∂wj​∂J​=N1​i=1∑N​(y^​i​−yi​)xij $$​