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

fix qat export bug when input_spec is None (#52615)

上级 2b12a117
......@@ -530,7 +530,8 @@ class ImperativeQuantizeOutputs:
model, paddle.nn.Layer
), "The model must be the instance of paddle.nn.Layer."
paddle.jit.to_static(model, input_spec=input_spec)
if input_spec:
paddle.jit.to_static(model, input_spec=input_spec)
paddle.jit.save(layer=model, path=path, input_spec=input_spec, **config)
is_dynamic_mode = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册