Coder Social home page Coder Social logo

cifar10_prune_project's Introduction

CIFAR-10 Model Training and Pruning

This project provides an implementation for training a convolutional neural network (CNN) on the CIFAR-10 dataset and subsequently applying model pruning to reduce the model size.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/Mohitkr95/CIFAR10_Prune_Project.git
    
  2. Change your current directory to the project folder:

    cd CIFAR10_Prune_Project
    
  3. Install required packages (Optional: It's recommended to create a virtual environment before installing the packages):

    pip install torch torchvision
    

Directory Structure

CIFAR10_Prune_Project/
│
├── data/                   
│
├── models/                 
│   ├── model.pth
│   └── pruned_model.pth
│
├── src/                    
│   ├── __init__.py
│   ├── dataset.py          
│   ├── model.py            
│   ├── train.py            
│   └── prune.py            
│
├── utils/                  
│   └── __init__.py
│
├── main.py                 
│
└── README.md               

Usage

  1. Run the main script to train and prune the model:

    python main.py
    
  2. The original and pruned model weights will be saved in the models/ directory.

Results

After running the main.py script, you'll get the following results:

image

  • Training and validation accuracy of the original model.
  • Validation accuracy after model pruning with different pruning ratios.
  • Saved model weights for both the original and pruned models in the models/ directory.

License

MIT © Mohitkr95

cifar10_prune_project's People

Contributors

mohitaligne avatar mohitkr95 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.