From 34426e761e1516e8943f807004c527a152120344 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 29 Mar 2019 13:31:30 +0800 Subject: [PATCH] Polish code test=develop --- python/paddle/fluid/optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index 2e596ef118..6f9cc197ee 100644 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -55,7 +55,7 @@ class Optimizer(object): """ def __init__(self, learning_rate, regularization=None, name=None): - if framework._in_imperative_mode(): + if framework._in_dygraph_mode(): if not isinstance(learning_rate, float) and \ not isinstance(learning_rate, LearningRateDecay): raise TypeError( -- GitLab