Skip to content

Repository files navigation

PyTorch Fundamentals: A 7-Day Learning Journey

A hands-on PyTorch learning repository covering tensors, autograd, neural networks, data loading, and binary classification.

PyTorch Python Status

Overview

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.

Learning Roadmap

Day 1 → Tensors
Day 2 → Autograd
Day 3 → Manual Regression
Day 4 → nn.Module
Day 5 → DataLoader
Day 6 → Binary Classification
Day 7 → Documentation

Daily Progress

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

Technologies Used

  • Python
  • PyTorch
  • NumPy
  • Matplotlib
  • Jupyter Notebook

Repository Structure

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

Standard PyTorch Training Workflow

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.

Results

Linear Regression (Day 3)

Binary Classification Decision Boundary (Day 6)

Key Outcomes

  • 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

Skills Demonstrated

  • Tensor Manipulation
  • Automatic Differentiation
  • Gradient Descent Optimization
  • Linear Regression
  • Neural Network Development
  • Data Loading Pipelines
  • Binary Classification
  • Model Training
  • Model Evaluation
  • Deep Learning Fundamentals

Getting Started

Clone Repository

git clone https://github.com/AlqamahAnsari/Pytorch.git
cd Pytorch

Install Dependencies

pip install -r requirements.txt

Launch Jupyter Notebook

jupyter notebook

Open any notebook and run the cells sequentially.

Future Learning Goals

  • Convolutional Neural Networks (CNNs)
  • Recurrent Neural Networks (RNNs)
  • Transfer Learning
  • Transformers
  • Natural Language Processing (NLP)
  • Large Language Models (LLMs)
  • Model Deployment

Author

Mohammad Alquamah Ansari

Support

If you found this repository useful, consider giving it a star.
It helps motivate future open-source AI and Machine Learning projects.

About

Structured PyTorch learning repository covering tensors, autograd, neural network training workflows, and binary classification.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages