diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index ef168d2d92175..ab3dbad1ef326 100755 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -6031,7 +6031,7 @@ def _offload(self, loss, startup_program=None): self._main_program = loss.block.program self.block = loss.block if startup_program == None: - startup_program = fluid.default_startup_program() + startup_program = paddle.static.default_startup_program() with program_guard(self._main_program, startup_program): assert len(self.checkpoint_shape) > 0, (