提交 a7453163 authored 作者: David Warde-Farley's avatar David Warde-Farley

Removed completely unused "First" op.

上级 4e0f8405
...@@ -1107,18 +1107,6 @@ class Clip(ScalarOp): ...@@ -1107,18 +1107,6 @@ class Clip(ScalarOp):
# As there is no mathematical reason for this function on complex # As there is no mathematical reason for this function on complex
clip = Clip(upcast_out_no_complex, name = 'clip') clip = Clip(upcast_out_no_complex, name = 'clip')
class First(BinaryScalarOp):
def impl(self, x, y):
return x
def c_code(self, node, name, (x, y), (z, ), sub):
return "%(z)s = %(x)s;" % locals()
def grad(self, (x, y), (gz, )):
if x.type in continuous_types:
return gz, None
else:
return None,None
first = First(transfer_type(0), name = 'first')
class Second(BinaryScalarOp): class Second(BinaryScalarOp):
def impl(self, x, y): def impl(self, x, y):
return y return y
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论