Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mengniwang95 authored Apr 18, 2023
1 parent bbf1431 commit 914de67
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ def eval_func(model, *args):
# fp32_op_names = ['Gemm_1410_MatMul', 'MatMul_(259|168)']
config = PostTrainingQuantConfig(approach='static',
quant_format=args.quant_format,
recipes={'smooth_quant': True,
'smooth_quant_args': {'alpha': 0.5}},
op_name_dict={op_name:FP32 for op_name in fp32_op_names} \
if fp32_op_names else None,)
q_model = quantization.fit(model,
Expand Down

0 comments on commit 914de67

Please sign in to comment.