Comments (4)
Looking more into it, it seems the tensor
mode fix is correct, but the next error has to do with the model having some modules that can't be fake quantized modules like Hard Sigmoid, which are defined in torch.ao.quantization.qconfig_mapping._FIXED_QPARAMS_OP_TO_OBSERVER
.
from mmrazor.
Hi! How did you use the output of the method get_deploy_model
of MMArchitectureQuant
to then convert the model to onnx?
I'm trying to export a quantized model using PyTorch 1.13.1 and using MMDeploy for_mmrazor branch didn't work for me... So, looking at MMRazor, I have created a hook called at the end of the training, that gets the output of get_deploy_model
(an torch ObservedGraphModule
) and passes it to torch.onnx.export
with some arguments.
I'm not sure what I'm doing is right, but I also don't understand why using MMDeploy if MMRazor provides quantizers with onnx_export methods...
EDIT: I have an exported onnx file but it seems that I only have quantized weights and not activations
from mmrazor.
I used a merge of the most recent mmdeploy with the for_mmrazor branch.
from mmrazor.
Which script(s) are you using? What is the purpose of having a get_deploy_model
method in MMRazor that returns an GraphModule
and a deploy.py
script in MMDeploy that takes a checkpoint file as input? I'm confused. Moreover, we already have an export_onnx
method in TorchNativeQuantizer of MMRazor and it seems that the get_deploy_model
method is never called in the QAT training of MMRazor.
from mmrazor.
Related Issues (20)
- How to get started??
- [Bug] TypeError: 'NoneType' object is not iterable
- Try to reproduce CWD in VOC data set
- [Bug] (suggested temporary fix) Pytorch >= 2 causes mmrazor.engine to fail HOT 4
- [Bug] (suggested fix) `nn.Parameter` are not added to root after being traced in `mmrazor.models.task_utils.tracer.fx.custom_tracer.build_graphmodule()` HOT 2
- [Bug] (suggested fix) `mmrazor.models.algorithms.quantization.mm_architecture.MMArchitectureQuant.sync_qparams()` fails if there are modules present in other modes but not in forward `mode='tensor'` HOT 4
- I want to obtain the current epoch value and associate it with the custom distillation loss
- cannot use recorder to obtain panoptic_head info from mask2former
- [Bug] `mmrazor.engine.runner.quantization_loops.QATValLoop` calls `after_val_epoch` hook twice with different keys, causing `mmengine.hooks.checkpoint_hook._save_best_checkpoint()` to fail with `KeyError` for the `save_best` config
- [Bug] Custom Distillation MMSeg CWD loss nan problem
- When I use methodoutputs to access the results of assigner, I only obtain one sample
- Regarding tables and accuracy
- Is this a dead project ? HOT 1
- 我在用mmrazor通过yolov5-x蒸馏yolov5-s时候遇到了问题 HOT 1
- No Sign of activation quantization with QAT HOT 1
- MAP is stucked at 0 for Mobilenet V2 SSD QAT without pretrained model [Bug]
- [Docs] A100算力加持!书生大模型实战营第3期全面升级,趣味闯关模式等你开启
- Missing keys after RTMDET knowledge distillation HOT 1
- Problematic difference between FakeQuantize for activations and weights HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmrazor.