8000 GitHub - oindrilasaha/pq-quantization
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

oindrilasaha/pq-quantization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PQ Quantization for Weights and Activations

Installation

Dependencies can be installed with: pip install -r requirements.txt

Quantization

Download the ImageNet1K dataset from https://www.kaggle.com/c/imagenet-object-localization-challenge/data and pass its location as YOUR_IMAGENET_PATH in --data-path argument For quantizing ResNets cd into src/ and by run the following commands:

  • For weight quantization:
python3 quantize.py --model resnet18 --block-size-cv 9 --block-size-pw 4 --n-centroids-cv 256 --n-centroids-pw 256 --n-centroids-fc 2048 --data-path YOUR_IMAGENET_PATH

Final Accuracy : 65.8%

  • For activation quantization:
python3 quantize_act.py --model resnet18 --data-path YOUR_IMAGENET_PATH

Final Accuracy on quantizing all ReLUs (except first) : 50%

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0