Skip to content

Repository files navigation

NeuroStack Banner

🧠 NeuroStack β€” AI/ML Learning Journey

A structured collection of notebooks and scripts covering the core domains of modern AI/ML β€” from classical algorithms to cutting-edge deep learning architectures, built through hands-on implementations and progressive experiments.


πŸ“ Project Structure

NeuroStack/
β”œβ”€β”€ πŸ“‚ Artificial_Intelligence/          # Search, planning, logic, agents (coming soon)
β”œβ”€β”€ πŸ“‚ assets/
β”‚   └── πŸ–ΌοΈ  NeuroStack.png               # Project banner image
β”œβ”€β”€ πŸ“‚ Computer_Vision/                  # Image processing, CNNs, object detection (coming soon)
β”œβ”€β”€ πŸ“‚ Deep_Learning/                    # ANN, RNN, LSTM, GRU, Encoder-Decoder (Jupyter Notebooks)
β”‚   β”œβ”€β”€ πŸ““ P1.1.ipynb                    # ANN β€” Apple Classification using Step Function (Binary)
β”‚   β”œβ”€β”€ πŸ““ P1.2.ipynb                    # ANN β€” Apple Classification using Sigmoid + Normalization
β”‚   β”œβ”€β”€ πŸ““ P2.1.ipynb                    # RNN β€” Forward Pass without Training (Random Weights)
β”‚   β”œβ”€β”€ πŸ““ P2.2.ipynb                    # RNN β€” With Training on 2 Sequences (MSE Loss)
β”‚   β”œβ”€β”€ πŸ““ P2.3.ipynb                    # RNN β€” Sequence Prediction (Next Number)
β”‚   β”œβ”€β”€ πŸ““ P2.4.ipynb                    # RNN β€” Sentiment Analysis on Movie Reviews
β”‚   β”œβ”€β”€ πŸ““ P3.1.ipynb                    # LSTM β€” Sequence Prediction (Next Number)
β”‚   β”œβ”€β”€ πŸ““ P3.2.ipynb                    # LSTM β€” Sentiment Analysis on Movie Reviews
β”‚   β”œβ”€β”€ πŸ““ P4.1.ipynb                    # GRU β€” Sequence Prediction (Next Number)
β”‚   β”œβ”€β”€ πŸ““ P4.2.ipynb                    # GRU β€” Sentiment Analysis on Movie Reviews
β”‚   └── πŸ““ P5.1.ipynb                    # Encoder–Decoder β€” Sequence Reversal (PyTorch GRU)
β”œβ”€β”€ πŸ“‚ Machine_Learning/                 # Supervised, unsupervised, regression (coming soon)
β”œβ”€β”€ πŸ“‚ Natural_Language_Processing/      # Text processing, embeddings, language models (coming soon)
β”œβ”€β”€ πŸ“‚ Transformer/                      # Transformer architecture from scratch (Python Scripts)
β”‚   β”œβ”€β”€ 🐍 P1.py                         # Self-Attention β€” Q, K, V matrices + scaled dot-product attention
β”‚   β”œβ”€β”€ 🐍 P2.py                         # Multi-Head Attention β€” split heads, per-head attention + concat
β”‚   β”œβ”€β”€ 🐍 P3.py                         # Positional Encoding β€” sinusoidal PE added to word embeddings
β”‚   β”œβ”€β”€ 🐍 P4.py                         # Transformer Decoder β€” masked self-attention + causal language model
β”‚   β”œβ”€β”€ 🐍 P5.py                         # Text Summarization β€” BART (facebook/bart-large-cnn) via HuggingFace
β”‚   β”œβ”€β”€ 🐍 P6.py                         # Sentiment Analysis β€” BERT multilingual fine-tuned model
β”‚   β”œβ”€β”€ 🐍 P7.py                         # Image Classification β€” Vision Transformer (ViT) via HuggingFace
β”‚   β”œβ”€β”€ 🐍 P8.py                         # Text Generation β€” GPT-2 with temperature sampling
β”‚   β”œβ”€β”€ 🐍 P9.py                         # Layer Normalization β€” manual implementation from scratch (PyTorch)
β”‚   └── 🐍 P10.py                        # Full Transformer β€” nn.Transformer with src/tgt forward pass
β”œβ”€β”€ πŸ“„ .gitignore
β”œβ”€β”€ πŸ“„ LICENSE
└── πŸ“„ README.md

πŸš€ Topics Covered

🧩 Domain πŸ“š Topics
Artificial Intelligence Search algorithms, CSP, game theory, agents
Machine Learning Linear/Logistic Regression, SVM, Decision Trees, Clustering
Deep Learning ANNs, RNNs, LSTMs, GRUs, Encoder-Decoder
Computer Vision Image classification, segmentation, OpenCV
NLP Tokenization, embeddings, sentiment analysis, seq2seq
Transformer Self-Attention, Multi-Head Attention, Positional Encoding, BERT, GPT-2, ViT

πŸ“’ Deep Learning β€” Notebook Details

πŸ”· ANN β€” Artificial Neural Networks

πŸ““ Notebook 🏷️ Topic πŸ“ Description
P1.1.ipynb ANN Binary classification of apples using Color & Weight with Step Function activation
P1.2.ipynb ANN Same as P1.1 but with Sigmoid activation and feature normalization

πŸ” RNN β€” Recurrent Neural Networks

πŸ““ Notebook 🏷️ Topic πŸ“ Description
P2.1.ipynb RNN Simple RNN forward pass on 2 sequences without any training (random weights)
P2.2.ipynb RNN Simple RNN trained on 2 sequences to predict a single numeric output (MSE loss)
P2.3.ipynb RNN RNN trained to predict the next number in a sequence (sequence learning)
P2.4.ipynb RNN Sentiment analysis on 3 movie reviews using Embedding + SimpleRNN (binary classification)

🧠 LSTM β€” Long Short-Term Memory

πŸ““ Notebook 🏷️ Topic πŸ“ Description
P3.1.ipynb LSTM LSTM trained to predict the next number in a sequence
P3.2.ipynb LSTM Sentiment analysis on movie reviews using Embedding + LSTM

⚑ GRU β€” Gated Recurrent Unit

πŸ““ Notebook 🏷️ Topic πŸ“ Description
P4.1.ipynb GRU GRU trained to predict the next number in a sequence
P4.2.ipynb GRU Sentiment analysis on movie reviews using Embedding + GRU

πŸ”„ Encoder–Decoder

πŸ““ Notebook 🏷️ Topic πŸ“ Description
P5.1.ipynb Encoder–Decoder Sequence reversal using GRU-based Encoder–Decoder architecture in PyTorch

βš™οΈ Transformer β€” Script Details

πŸ”© Built from Scratch (NumPy / PyTorch)

🐍 Script 🏷️ Topic πŸ“ Description
P1.py Self-Attention Computes Q, K, V projections and scaled dot-product attention using NumPy
P2.py Multi-Head Attention Splits Q/K/V into multiple heads, computes per-head attention, concatenates and projects output
P3.py Positional Encoding Sinusoidal positional encoding added to word embeddings using PyTorch
P4.py Transformer Decoder Causal language model using nn.TransformerDecoder with masked self-attention
P9.py Layer Normalization Manual layer norm from scratch β€” mean, variance, gamma & beta using PyTorch
P10.py Full Transformer End-to-end nn.Transformer with random src/tgt tensors and forward pass

πŸ€— Pretrained Models (HuggingFace Transformers)

🐍 Script 🏷️ Topic πŸ“ Description
P5.py Text Summarization Abstractive summarization using facebook/bart-large-cnn pipeline
P6.py Sentiment Analysis Star-rating sentiment classification using nlptown/bert-base-multilingual-uncased-sentiment
P7.py Image Classification Image classification using Vision Transformer google/vit-base-patch16-224
P8.py Text Generation Open-ended text generation using GPT-2 with temperature sampling

πŸš€ Getting Started

# Clone the repo
git clone https://github.com/AbhishekGiri04/NeuroStack.git

cd NeuroStack

# Install dependencies
pip install -r requirements.txt

# Launch Jupyter for Deep Learning notebooks
jupyter notebook

# Run Transformer scripts directly
python Transformer/P1.py

Open any .ipynb file in Jupyter and run cells top to bottom. Python scripts can be run directly from terminal.


πŸŽ“ Learning Outcomes

After exploring this project, you will understand:

βœ… ANN Fundamentals β€” Forward pass, activation functions (Step, Sigmoid), weight updates
βœ… RNN Architecture β€” Sequential data processing, hidden states, backprop through time
βœ… LSTM Internals β€” Forget, input & output gates, long-range dependency handling
βœ… GRU Mechanics β€” Simplified gating, reset & update gates, efficiency vs LSTM
βœ… Encoder–Decoder β€” Sequence-to-sequence learning, context vectors, GRU-based decoding
βœ… Self-Attention β€” Query, Key, Value projections and scaled dot-product attention
βœ… Multi-Head Attention β€” Parallel attention heads, head splitting and output projection
βœ… Positional Encoding β€” Sinusoidal encoding to inject position into embeddings
βœ… Transformer Decoder β€” Causal masking, autoregressive decoding
βœ… Layer Normalization β€” Manual implementation of mean, variance, gamma & beta
βœ… Pretrained Models β€” BART, BERT, GPT-2, ViT via HuggingFace Transformers
βœ… Loss Functions β€” MSE for regression, Binary Cross-Entropy for classification
βœ… PyTorch & Keras β€” Model building, training loops, and evaluation in both frameworks


πŸ› οΈ Tech Stack

πŸ–₯️ Technology βš™οΈ Purpose πŸ“Š What's Covered
Python Core Language Data processing, model logic, training loops
PyTorch Deep Learning Transformer, GRU Encoder-Decoder, Layer Norm from scratch
TensorFlow Deep Learning Keras-based RNN, LSTM, GRU, Embedding layers
HuggingFace Pretrained Models BART, BERT, GPT-2, ViT pipelines
Jupyter Notebooks Interactive experimentation & visualization
NumPy Numerics Array ops, manual attention computation

🌟 Key Features

  • πŸ““ 11 Notebooks β€” Progressive implementations: ANN β†’ RNN β†’ LSTM β†’ GRU β†’ Encoder-Decoder
  • 🐍 10 Python Scripts β€” Transformer internals from scratch + HuggingFace pretrained models
  • πŸ“š Educational β€” Clean, well-commented code with step-by-step logic
  • πŸ”¬ Hands-On β€” Real training loops, loss tracking, and predictions
  • πŸ”§ Modular β€” Each file is self-contained and independently runnable
  • ⚑ Dual Framework β€” Covers both PyTorch and TensorFlow/Keras
  • πŸ€— Pretrained Models β€” BART, BERT, GPT-2, ViT via HuggingFace
  • πŸ’‘ Learning-Focused β€” Progressive difficulty from binary classification to full Transformer

πŸ“¦ Requirements

  • Python 3.8+
  • Jupyter Notebook
  • PyTorch
  • TensorFlow / Keras
  • NumPy
  • HuggingFace Transformers
  • Pillow
  • Requests

πŸ“ž Contact & Support

πŸ‘€ Abhishek Giri β€” Creator & Maintainer


πŸ“„ License

This project is open source and available under the MIT License β€” see the LICENSE file for details.


🧠 Built with ❀️ for Learning AI & Deep Learning

Mastering Neural Networks from the ground up

Β© 2026 Abhishek Giri | NeuroStack

About

A comprehensive, production-grade repository covering Artificial Intelligence, Machine Learning, Deep Learning, Natural Language Processing, Computer Vision, and Transformer architectures.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages