提交 c7340d33 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3087 from gyom/ccw-fix

minor omission in previous ticket
......@@ -258,8 +258,11 @@ Op Example
__props__ = ()
def make_node(self, x):
# check that the theano version has support for __props__
assert hasattr(self, '__props__')
# check that the theano version has support for __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)
return theano.Apply(self, [x], [x.type()])
......@@ -324,9 +327,6 @@ and ``b`` are equal.
def make_node(self, x):
# check that the theano version has support for __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)
return theano.Apply(self, [x], [x.type()])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论