load

paddle.fluid.load(program, model_path, executor=None)[source]

This function filter out parameters and optimizer information from program, and then get corresponding value from file. An exception will throw if shape or dtype of the parameters is not match.

Parameters
  • program (Program) – The program will be loaded

  • model_path (str) – The file prefix store the program

  • executor (Executor, optional) – The executor used for initialize the parameter When startup program is not run.

Returns

None

Examples:
import paddle.fluid as fluid

prog = fluid.default_main_program()
fluid.save( prog, "./temp")

fluid.load( prog, "./temp")