result_cls.md

August 19, 2021 ยท View on GitHub

Classification

Refer classification.md for detailed instructions.

Both the Top-1(%) from original paper and the reproduction are listed. Corresponding training and testing configurations can be found in the config folder. Selected experiment results are listed. Users are encouraged to try different configurations to implement their own targets.

Note that the performance among different methods is obtained based on different training hyper-parameters. The accuracy in the table will not be the evidence of superior of one algorithm over another. Training hyper-parameters and tricks (such as weight normalization) play a considerable role on improving the performance. See the summary of my experience on training quantization networks in experience.md.

We provide pretrained models in google drive. Report missing pretrained model files if you cannot find it.

Try the 67.8% Top-1 LSQ quantization for ResNet-18 bash train.sh config/config.lsq.eval.imagenet.2bit.resnet18.

DatasetMethodModelA/WReportedTop-1FlagsConfig
imagenet-ResNet-1832/32-70.1PreBN,bacsFile
imagenet-Torch-R1832/3269.870.1Pytorch-officialFile
imagenetFixupResNet-1832/32-69.0fixup,cbsa,mixup=0.7File
imagenetFixupResNet-5032/32-75.9fixup,cbsa,mixup=0.7File
imagenetTResnetResNet-1832/3270.168.7PreBN,bacs,TResNetStemFile
imagenetLQ-netResNet-182/264.964.9PreBN,bacs, ep120 (old)File
imagenetLQ-netResNet-182/2-65.9PreBN,bacs,fm_qg=8, ep120 (old)File
imagenetLQ-netResNet-182/264.965.7PreBN,bacs, ep120File
imagenetLQ-netResNet-182/264.965.3PreBN,bacs,wt_mean-var, ep40
imagenetLQ-netResNet-182/264.965.6PreBN,bacs,wt_mean-var, ep120File
imagenetLQ-netResNet-182/264.965.4PreBN,bacs,wt_mean-var,wt_gq=1, ep120
imagenetLSQTorch-R182/267.667.3vanilla resnet(paper use pre act)File
imagenetDorefa-NetResNet-182/2-64.1PreBN,bacsFile
imagenetGroup-NetResNet-181/1-63.9cabs,bireal,base=5,without-softgateFile
imagenetXnor-NetResNet-181/151.252.0cbsa,fm_triangle,wt_pass,No-ReLUFile
imagenetXnor-NetResNet-181/151.250.5cbsa,fm_STE,wt_pass,No-ReLU
imagenetLSQTorch-R181/1-58.5ReLU,wt-var-mean,wtg=1
imagenetLSQTorch-R18t/t-65.1wd2.5e-5,wt_qg=1_var-mean,ns,ds,sgd_0,fp32,ep90
imagenetLSQTorch-R34t/t-69.2wd2.5e-5,wt_qg=1_var-mean,ns,ds,sgd_0,fp32,ep90
imagenetLSQTorch-R50t/t-72.6wd2.5e-5,wt_qg=1_var-mean,ns,ds,sgd_0,fp32,ep90
imagenetLSQTorch-R182/2-66.9wd2.5e-5,wt_qg=1_var-mean,ns,ds,sgd_0,fp32,ep90
imagenetLSQResNet-182/2-67.8wd2.5e-5,wt_qg=1_var-mean,sgd_1,fp32,ep90,kdFile
imagenetnon-uniformTorch-R182/2-66.8wd2.5e-5,sc3.0,wt_qg=1_var-mean,ns,ds,clrd,sgd_0,fp32,ep90
imagenetnon-uniformTorch-R182/2-65.5wd2e-5,sc3.0,wt_qg=1_var-mean,ns,ds,sgd_2,fp32,ep40
dalinon-uniformTorch-R182/2-65.8wd2e-5,sc3.0,wt_qg=1,ns,ds,sgd_2,fp16,ep40
imagenetnon-uniformTorch-R18t/t-65.0wd2.5e-5,wt_qg=1_var-mean,ns,ds,clrd,sgd_0,fp32,ep90
imagenetnon-uniformTorch-R18t/t-59.23wd2.5e-5,wt_qg=1_var-mean,ns,ds,clr_wd2.5e-5,sgd_0,fp32,ep90,train-scratch
imagenetnon-uniformTorch-R18t/t-64.8wd2.5e-5,wt_qg=1_var-mean,ns,ds,sgd_0,fp32,ep90
imagenetnon-uniform-DTorch-R18t/t-65.0wd2.5e-5,wt_qg=1_var-mean,ns,ds,clr_wd2.5e-5,sgd_0,fp32,ep90
imagenetnon-uniform-DTorch-R18t/t-64.8wd2.5e-5,wt_qg=1_var-mean,ns,ds,clrd,sgd_0,fp32,ep90
cifar100-ResNet-2032/32-67.41cbsa, ldn, baseline
cifar100-ResNet-2032/32-66.92cbsa, ldn, order c
cifar100-ResNet-2032/32-67.73cbsa, ldn, order cb
cifar100-ResNet-2032/32-66.23cbsa, ldn, order ca
cifar100-ResNet-2032/32-68.04cbsa, ldn, order cba
cifar100LSQResNet-202/2-63.92cbsa, ldq, baseline, real shortcut
cifar100LSQResNet-202/2-62.74cbsa, ldq, order c, real shortcut
cifar100LSQResNet-202/2-65.73cbsa, ldq, order cb, real shortcut
cifar100LSQResNet-202/2-58.88cbsa, ldq, order ca, real shortcut
cifar100LSQResNet-202/2-65.79cbsa, ldq, order cba, real shortcut
cifar100LSQResNet-202/2-61.86cbsa, ldq, baseline, 2bit shortcut
cifar100LSQResNet-202/2-1.00cbsa, ldq, order c, 2bit shortcut
cifar100LSQResNet-202/2-63.00cbsa, ldq, order cb, 2bit shortcut
cifar100LSQResNet-202/2-1.00cbsa, ldq, order ca, 2bit shortcut
cifar100LSQResNet-202/2-62.37cbsa, ldq, order cba, 2bit shortcut
dali-ResNet-1832/3269.870.5cbsa, ldn, order cb, fp16, sgd_2
imagenet-ResNet-1832/3269.871.4cbsa, ldn, order cb, fp32, sgd_2
cifar100-ResNet-1832/32-68.20cbsa,baseline
cifar100-ResNet-1832/32-64.85cbsa,prone,npd,keepdim,postbn
cifar100-ResNet-5032/32-70.26cbsa,baseline
cifar100-ResNet-5032/32-70.18cbsa,prone,npd,keepdim,postbn

Torch-Rxx indicates the ResNet architecture from Pytorch (so-called vanilla structure). ResNet-xx represnets the variants of ResNet. Minior differences are observed from different implementation from other projects. We provide flexible structure control to build compatibility of those projects. See resnet.md for the architecture description and classification.md for how to control the choice by different configuration.

Explanations on some flags:

  • cbsa / bacs: The resnet conv seq

  • wt_var-mean: apply weight normalization (type var-mean) on the weight

  • ep40 / ep120: total epoch of 40 / 120 in the training

  • fm_qg/ wt_qg: quantization group

  • real shortcut / real-skip: the downsample layer is kept in full precision. Other wise the shortcut is quantized (eg. 2bit shortcut)

  • old: indicating that better results are obtained but still not updated in the table.