A hands-on PyTorch learning repository covering tensors, autograd, neural networks, data loading, and binary classification.
This repository documents my structured journey of learning PyTorch from the fundamentals to building a complete binary classification model.
Over seven days, I explored:
- Tensor Operations
- Automatic Differentiation (Autograd)
- Manual Gradient Descent
- Neural Networks using
nn.Module - Data Loading with
DataLoader - Binary Classification and Evaluation
The goal was to understand the complete deep learning workflow rather than simply using pre-built models.
Day 1 → Tensors
Day 2 → Autograd
Day 3 → Manual Regression
Day 4 → nn.Module
Day 5 → DataLoader
Day 6 → Binary Classification
Day 7 → Documentation
| Day | Topic | Notebook |
|---|---|---|
| 1 | Tensor Operations | day1_tensors.ipynb |
| 2 | Autograd | day2_autograd.ipynb |
| 3 | Manual Linear Regression | day3_manual_regression.ipynb |
| 4 | Neural Networks with nn.Module | day4_nn_module.ipynb |
| 5 | Dataset & DataLoader | day5_dataloader.ipynb |
| 6 | Binary Classification | day6_binary_classifier.ipynb |
| 7 | Documentation | README.md |
- Python
- PyTorch
- NumPy
- Matplotlib
- Jupyter Notebook
Pytorch/
│
├── day1_tensors.ipynb
├── day2_autograd.ipynb
├── day3_manual_regression.ipynb
├── day4_nn_module.ipynb
├── day5_dataloader.ipynb
├── day6_binary_classifier.ipynb
│
├── requirements.txt
├── results-day3_fit.png
├── day6_boundary.png
└── README.md
for epoch in range(epochs):
model.train()
for X_batch, y_batch in train_loader:
optimizer.zero_grad()
predictions = model(X_batch)
loss = criterion(predictions, y_batch)
loss.backward()
optimizer.step()This workflow forms the foundation of most modern deep learning projects in PyTorch.
- Built a regression model from scratch
- Implemented gradient descent manually
- Developed a neural network classifier
- Achieved approximately 98% classification accuracy
- Visualized model predictions and decision boundaries
- Tensor Manipulation
- Automatic Differentiation
- Gradient Descent Optimization
- Linear Regression
- Neural Network Development
- Data Loading Pipelines
- Binary Classification
- Model Training
- Model Evaluation
- Deep Learning Fundamentals
git clone https://github.com/AlqamahAnsari/Pytorch.git
cd Pytorchpip install -r requirements.txtjupyter notebookOpen any notebook and run the cells sequentially.
- Convolutional Neural Networks (CNNs)
- Recurrent Neural Networks (RNNs)
- Transfer Learning
- Transformers
- Natural Language Processing (NLP)
- Large Language Models (LLMs)
- Model Deployment
Mohammad Alquamah Ansari
- GitHub: https://github.com/AlqamahAnsari
- Portfolio: https://alqamahansari.github.io/
If you found this repository useful, consider giving it a star.
It helps motivate future open-source AI and Machine Learning projects.

