未验证 提交 cbeff2b5 编写于 作者: C cc 提交者: GitHub

Add import for post_quant_without_data doc, test=develop, test=document_fix (#3137)

上级 3bc6a928
......@@ -37,11 +37,13 @@
对于调用无校准数据训练后量化,首先给出一个例子。
```python
from paddle.fluid.contrib.slim.quantization import WeightQuantization
model_dir = path/to/fp32_model_params
save_model_dir = path/to/save_model_path
weight_quant = WeightQuantization(model_dir=model_dir)
weight_quant.quantize_weight_to_int(save_model_dir=save_model_dir,
weight_bits=8,
weight_bits=16,
quantizable_op_type=['conv2d', 'depthwise_conv2d', 'mul'])
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册