Skip to content

Indecre/Machine-Learning-Models

Repository files navigation

🧠 Machine Learning Models with PyTorch

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.


πŸ“‚ Repository Navigation

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)

πŸš€ Models Overview & Results

πŸ”Ή Model 1 β€” 01_pytorch_workflow.ipynb

  • Type: Linear Regression Model
  • Loss: Mean loss
  • Optimizer: Manual Gradient Descent
  • Final Accuracy: ~95%
  • Final Loss: ~0.05

πŸ”Ή Model 2 β€” 02_MCM.ipynb

  • Type: Multi-Class Classification (Manual)
  • Loss: CrossEntropyLoss
  • Optimizer: SGD
  • Final Accuracy: ~92%
  • Final Loss: ~0.18

πŸ”Ή Model 3 β€” computer_vision.ipynb

  • 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.


🧰 Features

  • βœ… Manual & modular PyTorch models
  • βœ… Custom training/evaluation loops
  • βœ… Accuracy monitoring and loss tracking
  • βœ… GPU-compatible
  • βœ… Educational structure for beginners

πŸ”§ Requirements

pip install torch torchvision matplotlib tqdm

πŸ“ˆ Planned Improvements

  • Add training visualizations
  • Export .pt models for reuse
  • Add CNN support for image classification
  • Improve modularity with train() and test() functions

πŸ‘¨β€πŸ’» Author

Aryan Shukla
BTech Software Engineering @ DTU
🧠 Machine Learning β€’ πŸ•ΈοΈ Web Dev β€’ βš™οΈ Systems Programming


⭐ Project Rating

πŸ” Current Score: 8.5 / 10
βœ… Great modular structure
βœ… Clearly evolving complexity
⚠️ Missing visualizations and docstrings

Feel free to ⭐ star the repo or open a PR to contribute!


πŸ“¬ Questions / Contributions

Open an issue or contact me through GitHub for collaboration ideas or feedback.

About

Common ML models using PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published