1 Star 0 Fork 0

zhifanhe / nonlinear

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

非均匀量化测试

运行环境:

  • python3.7
  • tensorflow 2.0.0
  • numpy 1.19.2

MNIST

MNIST预训练模型位于 models/mnist_tf2_fw.h5 修改 mnist_nolinear.py的level数,如16、8、4等,运行程序,获得三种量化方式的推理准确率。

量化方式 全精度 32 16 8 4
逆采样 98.18 97.88 97.75 96.83 85.11
Lloyd 98.18 98.05 97.62 95.87 93.47
normal 98.18 97.90 96.70 92.33 56.82

cifar10

cifar10预训练模型位于 models/cifar10_tf2_fw.h5 修改 cifar10_nolinear.py的level数,如16、8、4等,运行程序,获得三种量化方式的推理准确率。

量化方式 全精度 32 16 8 4
逆采样 69.74 67.76 61.41 44.65 46.09
Lloyd 69.74 67.66 67.65 58.89 44.52
normal 69.74 67.66 63.00 44.82 10.82

Empty file

About

nonlinear quantization test expand collapse
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/he_zhifan/nonlinear.git
git@gitee.com:he_zhifan/nonlinear.git
he_zhifan
nonlinear
nonlinear
master

Search