Created by: LiuChiachi
PR types
New features
PR changes
APIs
Describe
This PR solved 3 TODOs in last PR #25894 about hapi.model._save_inference_model
by using new features of dy2stat #25960 in 2.0-beta API.
- Make it Unnecessary to run model before calling
_save_inference_model
for users in dygraph. - Save correct shape of input, now the interface stores the shape that the user sent to the inputs of the model in running.
- Make it Unnecessary to add
@paddle.jit.to_static
for users in dynamic mode.