提交 0cbbd630 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

Added __props__ in class TrueDot

上级 b82123d4
...@@ -3046,20 +3046,16 @@ class TrueDot(gof.op.Op): ...@@ -3046,20 +3046,16 @@ class TrueDot(gof.op.Op):
# TODO # TODO
# Simplify code by splitting into DotSS and DotSD. # Simplify code by splitting into DotSS and DotSD.
__props__ = ()
# The grad_preserves_dense attribute doesn't change the
# execution behavior. To let the optimizer merge nodes with
# different values of this attribute we shouldn't compare it
# here.
def __init__(self, grad_preserves_dense=True): def __init__(self, grad_preserves_dense=True):
self.grad_preserves_dense = grad_preserves_dense self.grad_preserves_dense = grad_preserves_dense
def __eq__(self, other):
# The grad_preserves_dense attribute doesn't change the
# execution behavior. To let the optimizer merge nodes with
# different values of this attribute we shouldn't compare it
# here.
return type(self) == type(other)
def __hash__(self):
return hash(type(self))
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论