Skip to content

Commit

Permalink
[examples] fix vit ptq (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc123 authored Jul 16, 2024
1 parent 3423a9c commit bda6c1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/quantization/specific/vit/vit_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def ptq_vit(args):
work_dir='out',
config={
'override_qconfig_func': set_ptq_fake_quantize,
'extra_tracer_opts': {'eliminate_dead_graph': True},
},
)
quantizer.quantize()
Expand Down Expand Up @@ -104,6 +105,7 @@ def ptq_vit(args):
'override_qconfig_func': set_ptq_fake_quantize,
"force_overwrite": True,
'set_quantizable_op_stats': True,
'extra_tracer_opts': {'eliminate_dead_graph': True},
},
)
ptq_model = quantizer.quantize()
Expand Down

0 comments on commit bda6c1c

Please sign in to comment.