未验证 提交 e587bc62 编写于 作者: Z Zhang Ting 提交者: GitHub

remove useless code, test=develop (#22111)

上级 c3bcd3c1
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册