GithubHelp home page GithubHelp logo

Comments (8)

RikAllen avatar RikAllen commented on June 7, 2024

This would I think complement the FPGA implementation very well - allowing us to remove some hardware blocks.

from nncf.

ljaljushkin avatar ljaljushkin commented on June 7, 2024

Probably, it makes sense to consider similar insight from HAWQ-v3 paper:
"We follow a simpler approach where we first keep the Conv and BN layer unfolded, and then we perform standard QAT by backpropagating the gradients as usual. After several epochs, we freeze the running statistics in the BN layer and only then perform CONV+BN folding and quantized to the target bit-width"

from nncf.

vshampor avatar vshampor commented on June 7, 2024

@asenina please post current results.

from nncf.

asenina avatar asenina commented on June 7, 2024
Model Pytorch measured Pytorch reference FP32 Openvino AC measured
unet_camvid_int8 (with folding conv and bn) 71. 57 % 71.95 % 71.67 %

from nncf.

Zehaos avatar Zehaos commented on June 7, 2024

@asenina Thanks you for your work. I have several questions.

  1. What is "pytorch measured", "Openvino AC measured" means?

  2. It seems that they got similar result on segmentation task. Is there a experiment on detection task?

If it is possible, I would be glad to test on more tasks using NNCF. Can the code (qat with folding conv and bn) be accessable to me?

from nncf.

asenina avatar asenina commented on June 7, 2024

@Zehaos

  1. "pytorch measured" - accuracy was measured on final compressed model in NNCF. (Use option --mode test and --resume path-to-result-checkpoint)
    "Openvino AC measured" - Final compressed model was converted to onnx, then to IR format. Then accuracy was measured on the model in IR format (use openvino runtime and accuraсy checker)
  2. I have not done experiments on detection task.

Please, track this in #446 . I will be glad if you test it on other task using NNCF and share the results (if possible). Thanks

from nncf.

Zehaos avatar Zehaos commented on June 7, 2024

@asenina Thanks for your reply! I will go into it soon.

from nncf.

asenina avatar asenina commented on June 7, 2024

Folding was implemented according to the following formulas:
image
Initial implementation
Results:

Model name Acc (without folding) Acc (with folding)
squeezenet1_1_imagenet_int8 58.04 % 58.14 %
unet_camvid_int8 71.66 % 72.03 %
icnet_camvid_int8 67.78 % 67.45 %
mobilenet_v2_imagnet_int8 71.31 % 71.67 %
mobilenet_v2_imagnet_int4_int8 71.03 % 70.98 %

BatchNorm folding gives minor improvements of accuracy only for int8 models. It will not merge to NNCF.

from nncf.

Related Issues (20)

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.