提交 4fbb0ef6 authored 作者: Frederic's avatar Frederic

Change attribute name

上级 9d7d952c
...@@ -3329,7 +3329,7 @@ class Composite(ScalarOp): ...@@ -3329,7 +3329,7 @@ class Composite(ScalarOp):
Composite depends on all the Ops in its graph having C code. Composite depends on all the Ops in its graph having C code.
""" """
__props__ = ('inputs', 'outputs') init_param = ('inputs', 'outputs')
def __str__(self): def __str__(self):
return self.name return self.name
...@@ -3341,7 +3341,7 @@ class Composite(ScalarOp): ...@@ -3341,7 +3341,7 @@ class Composite(ScalarOp):
This fct allow fix patch this. This fct allow fix patch this.
""" """
d = dict([(k, getattr(self, k)) for k in self.__props__]) d = dict([(k, getattr(self, k)) for k in self.init_param])
out = self.__class__(**d) out = self.__class__(**d)
if name: if name:
out.name = name out.name = name
......
...@@ -4,7 +4,7 @@ from theano.scalar import add, sub, true_div, mul ...@@ -4,7 +4,7 @@ from theano.scalar import add, sub, true_div, mul
class BNComposite(Composite): class BNComposite(Composite):
__props__ = ('dtype',) init_param = ('dtype',)
def __init__(self, dtype): def __init__(self, dtype):
self.dtype = dtype self.dtype = dtype
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论