Skip to content

Implementation of a simplified Inception-style CNN in TensorFlow/Keras, trained on CIFAR-10. Demonstrates parallel convolutional branches, modular block design, and efficient multi-path feature extraction for educational purposes.

License

Notifications You must be signed in to change notification settings

imehranasgari/DL_TF_SubClassingModel_MiniInception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

1) Project Title

Mini Inception Network — Custom CNN Architecture in TensorFlow/Keras


2) Problem Statement and Goal of Project

This project implements a compact version of the Inception architecture in TensorFlow/Keras for educational purposes. The goal is to:

  • Understand and implement parallel convolutional branches.
  • Learn how to design multi-path CNN modules.
  • Train a miniaturized Inception-style model on CIFAR-10.

3) Solution Approach

The notebook builds a Mini Inception Network from scratch:

  1. Inception Module:

    • Parallel paths with:

      • 1x1 convolutions
      • 3x3 convolutions
      • 5x5 convolutions
      • 3x3 max pooling followed by 1x1 convolution
    • Concatenation of feature maps along the channel axis.

  2. Model Architecture:

    • Input layer for 32×32×3 images.
    • One or more Mini Inception modules.
    • Global Average Pooling → Dense softmax output.
  3. Training:

    • Dataset: CIFAR-10 (via tf.keras.datasets).
    • Normalization by dividing pixel values by 255.0.
    • One-hot encoded labels with tf.keras.utils.to_categorical.
    • Loss: categorical_crossentropy
    • Optimizer: adam
  4. Evaluation:

    • Model compiled and trained for a limited number of epochs for demonstration.

4) Technologies & Libraries

  • Python
  • TensorFlow / Keras
  • NumPy
  • Matplotlib (for plotting training history)

5) Description about Dataset

  • CIFAR-10:

    • 60,000 images (32×32 RGB), 10 classes.
    • Training set: 50,000 images.
    • Test set: 10,000 images.
    • Classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck.
  • Preprocessing in code:

    • Normalization to [0, 1]
    • One-hot encoding of labels.

6) Installation & Execution Guide

Prerequisites

  • Python 3.x
  • TensorFlow

Install (pip)

pip install tensorflow numpy matplotlib

Run

  1. Open Mini Inception Network.ipynb in Jupyter/VS Code.

  2. Run all cells sequentially.

  3. The notebook will:

    • Load and preprocess CIFAR-10.
    • Build the Mini Inception model.
    • Train and evaluate the model.
    • Optionally plot training/validation accuracy and loss.

7) Key Results / Performance

  • Not provided — This notebook focuses on demonstrating architecture design and implementation rather than achieving state-of-the-art accuracy.

8) Screenshots / Sample Output

  • Not provided in repository — Running the notebook will generate model summary and training history plots.

9) Additional Learnings / Reflections

  • This project reinforces the concept of parallel convolutional branches from Google’s Inception networks.
  • Demonstrates how to implement modular blocks that can be reused in deeper architectures.
  • Shows how even simplified versions of complex networks can be valuable for learning and prototyping.
  • The limited training setup is intentional to prioritize architecture demonstration over exhaustive training.

👤 Author

Mehran Asgari Email: [email protected] GitHub: https://github.com/imehranasgari


📄 License

This project is licensed under the Apache 2.0 License – see the LICENSE file for details.


💡 Some interactive outputs (e.g., plots, widgets) may not display correctly on GitHub. If so, please view this notebook via nbviewer.org for full rendering.

About

Implementation of a simplified Inception-style CNN in TensorFlow/Keras, trained on CIFAR-10. Demonstrates parallel convolutional branches, modular block design, and efficient multi-path feature extraction for educational purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published