Comments (4)
Hi,
-
Can you share you error messages for the dictionary? We will check again and upload the correct version
-
The input_image_batch_1.npy is here https://github.com/Zhen-Dong/HAWQ/tree/main/tvm_benchmark/models
-
The numpy error should be caused by the numpy version. What is the version of you numpy? I see 1.2.1 should still have this function defined.
from hawq.
Hi,
- Can you share you error messages for the dictionary? We will check again and upload the correct version
- The input_image_batch_1.npy is here https://github.com/Zhen-Dong/HAWQ/tree/main/tvm_benchmark/models
- The numpy error should be caused by the numpy version. What is the version of you numpy? I see 1.2.1 should still have this function defined.
Hi, thank you for the quick reply. Maybe I've tried the error commands or used the wrong files. It's my pleasure if you can help figure out the problems.
- I've tried to run
python hawq_utils_resnet50.py --model-dir ./data
. Two models are tested: ResNet50 W8A8 (https://drive.google.com/file/d/1Ldo51ZPx6_2Eq60JgbL6hdPdQf5WbRf9/view?usp=sharing) and ResNet50 W4A4 (https://drive.google.com/file/d/1DDis-8C-EupCRj-ExH58ldSv-tG2RXyf/view?usp=sharing). Both these two tests report the error message:
File "hawq_utils_resnet50.py", line 479, in <module>
model = torch.load(file_name)
File "xxx/site-packages/torch/serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "xxx/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "xxx/site-packages/torch/serialization.py", line 211, in __init__
super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'xxx/quantized_checkpoint.pth.tar'
There are no quantized_checkpoint.pth.tar files in the provided download links.
Then I tried to use the ResNet18 model (https://drive.google.com/file/d/1CLAd3LhiRVYwiBZRuUJgrzrrPFfLvfWG/view?usp=sharing), the problem is there are no qconfig
modules in the model. I'm not sure whether these items are important and whether we can reproduce the results while ignoring these items (#10 (comment)).
Or should I follow the guides to generate the quantized models by myself?
- My numpy version is
1.19.1
. Do I need to downgrade the numpy?
from hawq.
-
I think the quantized_checkpoint got renamed for some reasons.... You can extract the zipped file and rename it quantized_checkpoint.pth.tar from checkpoint.pth.tar
-
I realized the problem may not be caused by the version but the image data. Can you try to use the image I provided? If the image.npy you generated is type of integer, it may causes an error.
from hawq.
@zachzzc no, the quantized_checkpoint are not present for most models in the zoo
One has to extract the quantized weights themselves using torch (#13 (comment))
For how to do this, please see the validate function in the quant train file
from hawq.
Related Issues (20)
- resnet50 from modelzoo is incorrect.
- W4A4 precision HOT 3
- Dyadic number HOT 1
- Question relate to FPGA inplementation
- Can I use HAWQ in my model for quantization&speedup?
- how to compute Hutchinson_trace array?
- pack_int32_to_int4 HOT 2
- Where can I find quantized_checkpoint.pth.tar file?
- Why are the first and last layers removed from the ILP search?
- How to choose HAWQ version HOT 1
- About quantization scheme
- Can't load provided checkpoints
- How can I get a weights file of all integers? HOT 1
- LpProblem和Hutchinson_trace方便开源一下? HOT 1
- Shift operation in TVM
- I have an Issue in test_resnet_inference.py
- Question About bit_config.py
- MobileNetV2 TVM W4A4 inference HOT 1
- Missing weight_percentile in QuantLinear
- ste_round() usage in quant_modules
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 hawq.