Code Monkey home page Code Monkey logo

calibtip's People

Contributors

itayhubara avatar papers-submission avatar ynahshan 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

calibtip's Issues

W4A4 result of MobileNet-V2

Hi!
Thanks for your work! In Table 2, you showed the results of w4a4 configuration for ResNet models. But you omitted the result of MobileNet-V2 at that table. From figure 3, it's hard to know the exact value of quantized MobileNet-V2. May I know w4a4 quantized MobileNet-V2, please?

Where is the file "IP_resnet50_loss.txt"?

when i use advanced_pipeline.sh, and i achieve bugs at line 3 "sh scripts/integer-programing.sh resnet resnet50 4 4 8 8 50 loss True",
which is 'No such file or directory: 'results/resnet50_w8a8.adaquant/IP_resnet50_loss.txt'.
How can I fix it? Thanks for response~

Shows invalid checkpoint error

Hello. I was trying to running the code as per instructed but got this error while running the code. Is there anything I am missing to add during the run? Please look into the errors.

main.py: error: invalid checkpoint: results/resnet50_w8a8/resnet.absorb_bn.measure_perC

error: argument -e/--evaluate: expected one argument

Quantized model accuracy

Good afternoon,

I found your paper very interesting and wanted to try out your code. I have a several questions I would be grateful if you could answer:

  1. In your paper you use a 71.97% benchmark for FP32 ResNet18 model. Is this your own trained checkpoint? The torchvision model zoo provides 69.76 top-1 accuracy.
  2. I am trying to measure accuracy of a quantized model(both weights and activations). The model saved after, for example, bn_tuning, contains weights that have attributes: quantize_weight.running_range, quantize_weight.running_zero_point, quantize_input.running_range, quantize_input.running_zero_point, beta, gamma, equ_scale, num_measured.
  • For activations, naturally, I placed forward hooks that quantize inputs to layers using quantize_input.running_zero_point and quantize_input.running_range. However, there is no range and zero point for quantizing inputs to residual connection(where residuals are summed with outputs from the previous layer). Did you not quantize those inputs when measuring accuracy?
  • Do I understand correctly, that the output model already contains quantized weights or do I have to quantize them myself using quantize_weight.running_range, quantize_weight.running_zero_point, gamma and beta attributes?
  • Maybe you already have a script for measuring accuracy of a quantized model and I just missed it?
  • What is the purpose of equ_scale attribute? In all of my tests on ResNet18 model they only contained ones(tensor of 1s).

Question about offset parameter in paper

Hi there!

In your paper https://arxiv.org/abs/2006.10518 there is a parameter V which was added to the weights of some layer in formula (2) or (3) and which should be optimized to minimize MSE between original and quantized outputs.

However, I can't find this offset parameter in your current repo. Is there something I have missed or you have decided to remove this parameter?

How gradients are computed

Hello and thank you for an interesting paper!
I have a question concerning the optimization of the quantization step size. In section D.1 of the paper, you mentioned the usage of Adam optimizer for solving the AdaQuant optimization problem, but I have failed to find a description of the methodology used for backpropagating gradients through formally nondifferentiable rounding operation. Is it just Straight Through Estimator?
Thank you for your time and consideration.

MSE loss calculation in adaquant optimize layer seems off for ResNet

This implies to calculate MSE between relu(conv_out) for conv1 and conv2 layers

relu_condition = lambda layer_name: 'conv1' in layer_name or 'conv2' in layer_name

But in ResNet architecture, conv2 is not followed by a direct Relu. Instead it follows by a residual addition, then Relu.

out = self.conv2(out)

out += residual

out = self.relu2(out)

How was this difference justified?

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.