提交 c3c53801 authored 作者: Guillaume Alain's avatar Guillaume Alain

adding more comment for _props

上级 11f6636c
...@@ -323,8 +323,11 @@ and ``b`` are equal. ...@@ -323,8 +323,11 @@ and ``b`` are equal.
super(AXPBOp, self).__init__() super(AXPBOp, self).__init__()
def make_node(self, x): def make_node(self, x):
# check that the theano version has support for __props__ # check that the theano version has support for __props__.
assert hasattr(self, '__props__') # This next line looks like it has a typo,
# but it's actually a way to detect the theano version
# is sufficiently recent to support the use of __props__.
assert hasattr(self, '_props'), "Your version of theano is too old to support __props__."
x = theano.tensor.as_tensor_variable(x) x = theano.tensor.as_tensor_variable(x)
return theano.Apply(self, [x], [x.type()]) return theano.Apply(self, [x], [x.type()])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论