未验证 提交 266283b2 编写于 作者: G Guanghua Yu 提交者: GitHub

remove postprocess in dygraph ptq export (#47487)

上级 de4a7911
...@@ -140,15 +140,11 @@ class ImperativePTQ(object): ...@@ -140,15 +140,11 @@ class ImperativePTQ(object):
assert isinstance( assert isinstance(
model, paddle.nn.Layer model, paddle.nn.Layer
), "The model must be the instance of paddle.nn.Layer." ), "The model must be the instance of paddle.nn.Layer."
is_postprocess = config.get('postprocess', True)
config.pop('postprocess', None)
# Convert and save dygraph quantized model # Convert and save dygraph quantized model
self._convert(model) self._convert(model)
paddle.jit.save(layer=model, path=path, input_spec=input_spec, **config) paddle.jit.save(layer=model, path=path, input_spec=input_spec, **config)
if not is_postprocess:
return
# Load inference program # Load inference program
is_dynamic_mode = False is_dynamic_mode = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册