A hands-on implementation of an Artificial Neural Network (ANN) using PyTorch. This project focuses on building low-level Dataset pipelines, DataLoader batching, and a custom training loop with explicit backpropagation steps.
- Custom Pipeline: Built-in PyTorch
DatasetandDataLoaderclasses for batch processing. - Network Architecture: Multi-layer Perceptron (MLP) incorporating
BatchNorm1d,ReLU, andDropoutlayers. - Manual Training Loop: Explicit gradient zeroing, forward pass, loss computation, backpropagation, and optimization step execution.
- Loss Tracking: Generates and exports training vs. validation loss curve graphs.
Day03_Deep_Learning_PyTorch/
βββ artifacts/
β βββ pytorch_ann_model.pth # Model weights state dict
β βββ loss_curve.png # Loss evaluation plot
βββ nn_from_scratch.py # PyTorch architecture & training loop script
βββ .gitignore
βββ README.md
π How to Run
1. Setup Environment
Bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install torch pandas numpy scikit-learn matplotlib
2. Execute PyTorch Training Loop
Bash
python nn_from_scratch.py
Part of the 7-Day Machine Learning Engineering Challenge.