zkkli / repq-vit Goto Github PK
View Code? Open in Web Editor NEW[ICCV 2023] RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers
License: Apache License 2.0
[ICCV 2023] RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers
License: Apache License 2.0
Hello! In your four detection experiments, I noticed a significant difference between the reported result and the test result for mask_rcnn_swin_small
. The reported result is 44.2 mAP, but the tested result is 42.8 mAP. However, the results for the other three detection experiments match the reported results. I was wondering if there are any specific settings for mask_rcnn_swin_small
, such as only quantizing the backbone?
Thank you for your contributions in the field of model quantification and generously sharing your code.
I encountered a problem where I ran a quantitative example and obtained the corresponding top 1 and top 5 data using the same W and A, which were the same as the author's results, but the q I saved_ Model. pth, open using Netron and see that it is still in float32 format. How can I save the quantization model correctly.
The code I use to save the results is:
Save. pth format:
torch. save (q_model, 'my/save/path')
Save onnx format:
dummy_ Input=torch. randn ((1, 3, 224, 224)). to (device)
torch. onnx. export (q_model, dummy input, onnx_path, verbose=False, inputnames=['input '], outputnames=['output'], opset_version=11)
The pytorch version I am using is:
torch==1.11.0+cu113
torchvision==0.12.0+cu113
timm==0.4.12
It seems that, after the log sqrt2 quantization, the activations have different scale parameters at different positions. So, in actual hardware, would it be impossible to perform subsequent matrix multiplications using integer form?
Hi, I notice in Table 1. there is "No REC" in column 3. And I wonder what it means and does it affects inference speed a lot. Thank you.
When I try to run the code, there is a problem in line 117 of test_quant.py "next_module = father_module.reduction". my shell is "python test_quant.py --model deit_small --dataset /root/data/Imagenet". Is there any problem with my shell?
I am trying to run your code, but I cannot install the packages based on the instructions provided. Can you give the latest instructions for running your code?
Hi~ the concept of channel-wise in Conv is quite intuitive, but how to understand channel in tensor with shape [batch_size, num_seq, num_hidden] ? weather the channel refers to the num_seq dim or not?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.