From e587bc62f9d736dab32fe327715ebc1e814ffb27 Mon Sep 17 00:00:00 2001 From: Zhang Ting <709968123@qq.com> Date: Wed, 8 Jan 2020 21:45:29 +0800 Subject: [PATCH] remove useless code, test=develop (#22111) --- python/paddle/fluid/layers/control_flow.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/python/paddle/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py index f732324215..8afd161101 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', -- GitLab