diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index ef168d2d9217519aa2a2247011b45b1101e39337..ab3dbad1ef326dabb3578d79207853cf96028003 100755 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -6031,7 +6031,7 @@ class RecomputeOptimizer(Optimizer): 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, (