diff --git a/python/paddle/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py index f732324215dffd9d37733babb43056a844a03632..8afd1611014209a8affd76f37ca49df5fe727c4a 100755 --- a/python/paddle/fluid/layers/control_flow.py +++ b/python/paddle/fluid/layers/control_flow.py @@ -20,7 +20,6 @@ from .tensor import assign, cast, fill_constant from .. import core from ..framework import Program, Variable, Operator from ..layer_helper import LayerHelper, unique_name -from ..initializer import force_init_on_cpu from .nn import logical_and, logical_not, logical_or from .utils import assert_same_structure, map_structure import numpy @@ -1344,8 +1343,6 @@ def less_than(x, y, force_cpu=None, cond=None): attrs = dict() if force_cpu is not None: attrs['force_cpu'] = force_cpu - elif force_init_on_cpu(): - attrs['force_cpu'] = force_init_on_cpu() helper.append_op( type='less_than', @@ -1388,8 +1385,6 @@ def less_equal(x, y, cond=None): cond.stop_gradient = True attrs = dict() - if force_init_on_cpu(): - attrs['force_cpu'] = force_init_on_cpu() helper.append_op( type='less_equal', @@ -1431,8 +1426,6 @@ def greater_than(x, y, cond=None): cond.stop_gradient = True attrs = dict() - if force_init_on_cpu(): - attrs['force_cpu'] = force_init_on_cpu() helper.append_op( type='greater_than', @@ -1476,8 +1469,6 @@ def greater_equal(x, y, cond=None): cond.stop_gradient = True attrs = dict() - if force_init_on_cpu(): - attrs['force_cpu'] = force_init_on_cpu() helper.append_op( type='greater_equal',