PyTorch implementation of DAQ
This is an official implementation of the paper "Distance-aware Quantization", accepted to ICCV2021.
For more information, checkout the project site [website].
Getting started
Dependencies
- Python 3.6
- PyTorch = 1.5.0
Datasets
- Cifar-10
- This can be automatically downloaded by learning our code
- ImageNet
- This is available at here
Training & Evaluation
First, clone our github repository.
$ git clone https://github.com/cvlab-yonsei/DAQ.git
Cifar-10 dataset (ResNet-20 architecture)
- First, download full-precision model into
results/
folder. Link: [weights] - Note that you create
results/
directory manually.
# Cifar-10 & ResNet-20 W1A1 model
$ python cifar10_train.py --config configs/DAQ/resnet20_DAQ_W1A1.yml
# Cifar-10 & ResNet-20 W1A32 model
$ python cifar10_train.py --config configs/DAQ/resnet20_DAQ_W1A32.yml
ImageNet dataset (ResNet-18 architecture)
- Will be released
# ImageNet & ResNet-18 W1A1 model
# ImageNet & ResNet-18 W1A1 model
Using the pretrained models
Citation
@inproceedings{kim2021daq,
author={Kim, Dohyung and Lee, Junghyup and Ham, Bumsub},
title={Distance-aware Quantization},
booktitle={Proceedings of International Conference on Computer Vision},
year={2021},
}
Credit
- ImageNet training code: [PyTorch official example code]
- ResNet-18 models: [PyTorch official code]
- ResNet-20 model: [ResNet on CIFAR10] [IRNet]
- Quantized modules: [DSQ]