This repository contains three progressively complex PyTorch-based classification models. Each demonstrates a different approach β from manual training loops to modular nn.Module structures β showcasing the evolution of model-building skills.
Machine-Learning-Models/
β
βββ 01_pytorch_workflow.ipynb # Manual binary classification with raw tensors
βββ 02_MCM.ipynb # Manual multi-class classification using softmax and CE loss
βββ 02_neural_networks.ipynb # nn.Module-based binary classifier using BCEWithLogitsLoss
βββ README.md # Project documentation (this file)
- Type: Linear Regression Model
- Loss:
Mean loss - Optimizer: Manual Gradient Descent
- Final Accuracy: ~95%
- Final Loss: ~0.05
- Type: Multi-Class Classification (Manual)
- Loss:
CrossEntropyLoss - Optimizer:
SGD - Final Accuracy: ~92%
- Final Loss: ~0.18
- Type: CNN model on image classification (Modular)
- Loss:
BCEWithLogitsLoss - Optimizer:
SGD (lr=0.01) - Final Accuracy: ~83%
- Final Loss: ~0.4
Note: Metrics may slightly vary depending on seed and hardware.
- β Manual & modular PyTorch models
- β Custom training/evaluation loops
- β Accuracy monitoring and loss tracking
- β GPU-compatible
- β Educational structure for beginners
pip install torch torchvision matplotlib tqdm- Add training visualizations
- Export
.ptmodels for reuse - Add CNN support for image classification
- Improve modularity with
train()andtest()functions
Aryan Shukla
BTech Software Engineering @ DTU
π§ Machine Learning β’ πΈοΈ Web Dev β’ βοΈ Systems Programming
π Current Score: 8.5 / 10
β
Great modular structure
β
Clearly evolving complexity
Feel free to β star the repo or open a PR to contribute!
Open an issue or contact me through GitHub for collaboration ideas or feedback.