Skip to content

More user-friendly Save/Load API of Fluid #7931

Closed
@QiJune

Description

@QiJune

We now have three save interface in fluid:

  • save_vars for saving a list of variables
  • save_params for saving all parameters
  • save_persistables for saving checkpoint

And save_vars interface is not exposed to users directly since users can not access a variable created inside a layer. We can use save_persistables to do checkpoint when training. And we expect save_params can work in saving model for inference.

But save_params and save_persistables are not enough to cover all cases. For example, if we want to save a model for inference network with BN layer, global mean variable is needed, whereas momentum variable is not needed. Both save_params and save_persistables are not satisfied.

We need to design a more user-friendly save/load API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions