提交 cdeaa76c authored 作者: Iban Harlouchet's avatar Iban Harlouchet

__props__ for theano/gof/tests/test_graph.py

上级 29c4979e
...@@ -45,6 +45,8 @@ def MyVariable(thingy): ...@@ -45,6 +45,8 @@ def MyVariable(thingy):
class MyOp(Op): class MyOp(Op):
__props__ = ()
def make_node(self, *inputs): def make_node(self, *inputs):
inputs = list(map(as_variable, inputs)) inputs = list(map(as_variable, inputs))
for input in inputs: for input in inputs:
...@@ -54,9 +56,6 @@ class MyOp(Op): ...@@ -54,9 +56,6 @@ class MyOp(Op):
outputs = [MyVariable(sum([input.type.thingy for input in inputs]))] outputs = [MyVariable(sum([input.type.thingy for input in inputs]))]
return Apply(self, inputs, outputs) return Apply(self, inputs, outputs)
def __str__(self):
return self.__class__.__name__
MyOp = MyOp() MyOp = MyOp()
########## ##########
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论