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 People

Contributors

sanjana7395 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

static_quantization's Issues

Usage of Sine function from torch module

Hi, I've appreciated your work with ResNet18 and quantization approach, I also tried to study your code in order to understand whether my code, from the job that I've to accomplish to, can be adapted in order to take few snippet of code from your notebook for let my model to exploit quantization properties after training.

A issue that I've encoutered was that when trying or attempting to create a model with torch.sine operation instead of any other well-known activation functions, such as RELU et al., If I use dynamic quantization technique no errors arise, while when exploiting other quant techs such as dynamic or post train quant the script rises an exception since the model is not able to carry out operation with data from a backend such as QuantizeCPU and other torch operations.

If you are interested in helping me, I will tell you more precisely my issue.

So far, I will post you my github project so that you can check the problem I'm facing:

In particular the issue I've encoutered so far was when I run a train from the following notebook:

You can run it, if you copy it and load to colab notebook whit the following setting, and looking at the final colab cell:

  • EVAL_POST_TRAIN = False
  • TRAIN_MODEL = True
  • TRAIN_MODEL_NO_QUANT = False
  • TRAIN_MODEL_DYNAMIC_QUANT = False
  • TRAIN_MODEL_POST_TRAIN_QUANT = True

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.