cifar10 |
fp32 |
w4a4 |
w3a3 |
w2a2 |
vggsmall |
93.8 |
93.7 |
92.5 |
86 |
./run_cli.sh examples/classifier_cifar10/prototxt/vggsmall_lsq_w4a4_single_gpu.prototxt
./run_cli.sh examples/classifier_cifar10/prototxt/vggsmall_lsq_w3a3_single_gpu.prototxt
./run_cli.sh examples/classifier_cifar10/prototxt/vggsmall_lsq_w2a2_single_gpu.prototxt
The last layer is quantized.
LSQ |
fp32 |
w4a4 |
w3a3 |
AlexNet |
56.55, 79.09 |
56.36 |
48.21 |
LSQ |
fp32 |
w4a4 |
w3a3 |
w2a2 |
w8a8(1epoch, quantize data) |
AlexNet |
56.55, 79.09 |
56.96, 79.46 √ |
55.31, 78.59 |
51.18, 75.38 |
|
ResNet18 |
69.76, 89.08 |
70.26, 89.34 √ |
69.45, 88.85 |
|
69.68 88.92 √ |
|
|
|
|
|
|
|
|
|
|
|
|
python examples/classifier_imagenet/main.py ~/datasets/data.imagenet \
-a alexnet_lsq -j 10 --pretrained -b 2048 --log-name $2 \
--lr 0.01 --wd 1e-4 --warmup-epoch -1 \
--gpu $1 --epochs 90 --lr-scheduler CosineAnnealingLR \
--qw 4 --qa 4 --q-mode layer_wise \
--debug
python examples/classifier_imagenet/main.py ~/datasets/data.imagenet \
-a alexnet_lsq -j 10 --pretrained -b 2048 --log-name $2 \
--lr 0.01 --wd 1e-4 --warmup-epoch -1 \
--gpu $1 --epochs 90 --lr-scheduler CosineAnnealingLR \
--qw 3 --qa 3 --q-mode layer_wise \
--debug
python examples/classifier_imagenet/main.py ~/datasets/data.imagenet \
-a alexnet_lsq -j 10 --pretrained -b 2048 --log-name $2 \
--lr 0.01 --wd 1e-4 --warmup-epoch -1 \
--gpu $1 --epochs 90 --lr-scheduler CosineAnnealingLR \
--qw 3 --qa 3 --q-mode layer_wise \
--debug
python examples/classifier_imagenet/main.py ~/datasets/data.imagenet \
-a resnet18_lsq -j 10 -b 512 --pretrained \
--lr 0.01 --wd 1e-4 --warmup-epoch -1 \
--gpu $1 --log-name $2 --epochs 90 --lr-scheduler CosineAnnealingLR \
--qw 4 --qa 4 --q-mode layer_wise \
--debug