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.
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
| π§© 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 |
| π 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 |
| π 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) |
| π 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 |
| π 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 |
| π Notebook | π·οΈ Topic | π Description |
|---|---|---|
| P5.1.ipynb | EncoderβDecoder | Sequence reversal using GRU-based EncoderβDecoder architecture in 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 |
| π 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 |
# 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.pyOpen any
.ipynbfile in Jupyter and run cells top to bottom. Python scripts can be run directly from terminal.
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
- π 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
- Python 3.8+
- Jupyter Notebook
- PyTorch
- TensorFlow / Keras
- NumPy
- HuggingFace Transformers
- Pillow
- Requests
π€ Abhishek Giri β Creator & Maintainer
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