提交 99093259 authored 作者: Frederic's avatar Frederic

add __str__ to AdvancedIncSubtensor1

上级 63c65039
...@@ -5186,6 +5186,18 @@ class AdvancedIncSubtensor1(Op): ...@@ -5186,6 +5186,18 @@ class AdvancedIncSubtensor1(Op):
and self.inplace == other.inplace and self.inplace == other.inplace
and self.set_instead_of_inc == other.set_instead_of_inc) and self.set_instead_of_inc == other.set_instead_of_inc)
def __str__(self):
if self.inplace:
msg = "inplace"
else:
msg = "no_inplace"
if self.set_instead_of_inc:
msg += ",set"
else:
msg += ",inc"
return self.__class__.__name__ + "{%s}" % msg
def make_node(self, x, y, ilist): def make_node(self, x, y, ilist):
x_ = as_tensor_variable(x) x_ = as_tensor_variable(x)
y_ = as_tensor_variable(y) y_ = as_tensor_variable(y)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论