提交 33676c8a authored 作者: Guillaume Alain's avatar Guillaume Alain

moved comments around

上级 c3c53801
...@@ -258,8 +258,11 @@ Op Example ...@@ -258,8 +258,11 @@ Op Example
__props__ = () __props__ = ()
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()])
...@@ -324,9 +327,6 @@ and ``b`` are equal. ...@@ -324,9 +327,6 @@ and ``b`` are equal.
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__.
# 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__." 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论