Coder Social home page Coder Social logo

sanjana7395 / static_quantization Goto Github PK

View Code? Open in Web Editor NEW
36.0 0.0 7.0 88 KB

Post-training static quantization using ResNet18 architecture

License: MIT License

Jupyter Notebook 100.00%
quantization post-training-quantization resnet-18 mnist-classification pytorch floatfunctional fbgemm float32-to-int8 reduce-inference-time reduce-memory-storage

static_quantization's Introduction

Post-training Static Quantization (Pytorch)

This project perform post-training static quantization in Pytorch using ResNet18 architecture.

Configuration of Project Environment

  1. Clone the project.
  2. Install packages required.
  3. Run the notebook.

Setup procedure

  1. Clone project from GitHub.
    Change to the directory static_quantization.

  2. Install packages
    In order to reproduce the code install the packages

        pip install torch==1.5.1 
        pip install torchvision==0.6.1 
        pip install matplotlib
    
  3. Run the notebook.
    In this notebook we use MNIST data set for experimenting.

Results

Below are the results obtained on the test set for the models trained in the project.

NOTE
The results obtained are system specific. Due to different combinations of the neural network cudnn library versions and NVIDIA driver library versions, the results can be slightly different. To the best of my knowledge, upon reproducing the environment, the ballpark number will be close to the results obtained.

Models Accuracy (%) Memory size (MB) Inference time (ms)
Original 99.28 44.76 15.06
Quantized 99.26 11.20 3.64

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.