diff --git a/python/paddle/quantization/imperative/qat.py b/python/paddle/quantization/imperative/qat.py index 921862a0f5d8aff53667e07f19ccb18a0ae79738..9a1109ccbf6a41bec8ec8993dbab24ba8d37649f 100644 --- a/python/paddle/quantization/imperative/qat.py +++ b/python/paddle/quantization/imperative/qat.py @@ -530,6 +530,7 @@ 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) paddle.jit.save(layer=model, path=path, input_spec=input_spec, **config) is_dynamic_mode = False