Skip to content

3 different tasks, convolution and pooling implementations, CNNs and transfer learning.

License

Notifications You must be signed in to change notification settings

kkKaan/deep-learning-403-hw3

Repository files navigation

CENG403 - Spring 2024 - THE3

This repository contains three tasks as part of the CENG403 course, designed to provide hands-on experience with Convolutional Neural Networks (CNNs) and transfer learning using PyTorch. The tasks include implementing naive convolution and pooling operations, building a CNN with PyTorch, and finetuning a pretrained ResNet18 for CIFAR10.

Project Structure

  • CENG403_THE3_Part1.ipynb: Implementation of naive convolution and pooling operations.
  • CENG403_THE3_Part2.ipynb: Implementation of a CNN using PyTorch.
  • CENG403_THE3_Part3.ipynb: Finetuning a pretrained ResNet18 for CIFAR10.

Task 1: Naive Convolution and Pooling Implementation

Objective

Implement convolution and pooling operations manually to understand their inner workings, including both forward and backward passes.

Files Overview

CENG403_THE3_Part1.ipynb

  • Import the Modules: Importing necessary Python libraries.
  • Implementing Convolution Operation: Step-by-step implementation of the convolution operation.
  • Implementing Pooling Operation: Step-by-step implementation of the pooling operation.
  • Backpropagation: Implementing the backpropagation for both convolution and pooling layers.

Usage

Open and run CENG403_THE3_Part1.ipynb directly in Jupyter Notebook or Google Colab. Follow the instructions and cells sequentially to understand and execute the code.

Task 2: CNN Implementation with PyTorch

Objective

Implement and train a CNN using PyTorch, including defining the network architecture, training the model, and evaluating its performance.

Files Overview

CENG403_THE3_Part2.ipynb

  • Import the Modules: Importing necessary Python libraries and PyTorch modules.
  • Building the CNN: Defining the architecture of the CNN.
  • Training the CNN: Training the CNN on a dataset.
  • Evaluating the Model: Evaluating the performance of the trained model.

Usage

Open and run CENG403_THE3_Part2.ipynb directly in Jupyter Notebook or Google Colab. Follow the instructions and cells sequentially to understand and execute the code.

Task 3: Finetuning ResNet18 for CIFAR10

Objective

Adapt and finetune a ResNet18 model, pretrained on ImageNet, for the CIFAR10 dataset. This includes loading the pretrained model, modifying it for CIFAR10, and training the modified model.

Files Overview

CENG403_THE3_Part3.ipynb

  • Download and Test Pretrained ResNet18: Downloading and testing the pretrained ResNet18 model.
  • Adapting ResNet18 for CIFAR10: Modifying the model architecture to suit the CIFAR10 dataset.
  • Finetuning the Model: Training the adapted model on CIFAR10.
  • Evaluating the Model: Evaluating the performance of the finetuned model.

Usage

Open and run CENG403_THE3_Part3.ipynb directly in Jupyter Notebook or Google Colab. Follow the instructions and cells sequentially to understand and execute the code.

About

3 different tasks, convolution and pooling implementations, CNNs and transfer learning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published