未验证 提交 5784dfe1 编写于 作者: G Guanghua Yu 提交者: GitHub

support conv2d_transpose quant in act (#1332)

上级 7a01ec90
...@@ -47,8 +47,10 @@ default_hpo_config = { ...@@ -47,8 +47,10 @@ default_hpo_config = {
# default quant config, can be used by ptq&hpo and qat&distillation # default quant config, can be used by ptq&hpo and qat&distillation
default_quant_config = { default_quant_config = {
'quantize_op_types': 'quantize_op_types': [
['conv2d', 'depthwise_conv2d', 'mul', 'matmul', 'matmul_v2'], 'conv2d', 'depthwise_conv2d', 'conv2d_transpose', 'mul', 'matmul',
'matmul_v2'
],
'weight_bits': 8, 'weight_bits': 8,
'activation_bits': 8, 'activation_bits': 8,
"is_full_quantize": False, "is_full_quantize": False,
......
...@@ -53,7 +53,8 @@ class BaseStrategy: ...@@ -53,7 +53,8 @@ class BaseStrategy:
class Quantization(BaseStrategy): class Quantization(BaseStrategy):
def __init__(self, def __init__(self,
quantize_op_types=[ quantize_op_types=[
'conv2d', 'depthwise_conv2d', 'mul', 'matmul', 'matmul_v2' 'conv2d', 'depthwise_conv2d', 'conv2d_transpose', 'mul',
'matmul', 'matmul_v2'
], ],
weight_bits=8, weight_bits=8,
activation_bits=8, activation_bits=8,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册