提交 9a928682 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

documentation fixes

上级 e45087b7
...@@ -62,7 +62,8 @@ There are less methods to define for an Op than for a Type: ...@@ -62,7 +62,8 @@ There are less methods to define for an Op than for a Type:
we will be able to have the shape without its computation. we will be able to have the shape without its computation.
must return a tuple with one tuple with the shape of each output. must return a tuple with one tuple with the shape of each output.
Example of matrix-matrix product input_shapes will have as input Example of matrix-matrix product input_shapes will have as input
(node, ((x0,x1), (y0,y1))) and should return ((x0, y1)). (node, ((x0,x1), (y0,y1))) and should return [(x0, y1)]. Both the
inputs and the return value may be theano variables.
The ``name`` argument is currently given an invalid value, so steer The ``name`` argument is currently given an invalid value, so steer
away from it. As was the case with Type, ``sub['fail']`` provides away from it. As was the case with Type, ``sub['fail']`` provides
......
...@@ -466,6 +466,9 @@ TensorVariable ...@@ -466,6 +466,9 @@ TensorVariable
See :func:`dimshuffle`. See :func:`dimshuffle`.
(The above link just points back to this paragraph. Maybe whoever
wrote that meant to refer to theano.tensor.DimShuffle)
......
...@@ -553,7 +553,8 @@ class ShapeFeature(object): ...@@ -553,7 +553,8 @@ class ShapeFeature(object):
# an element of o_shapes is either None or a tuple # an element of o_shapes is either None or a tuple
# elements of the tuple can be either strings, or ints # elements of the tuple can be either strings, or ints
assert len(o_shapes) == len(node.outputs) if len(o_shapes) != len(node.outputs):
raise Exception('len(o_shapes) = '+str(len(o_shapes))+' != len(node.outputs) = '+str(len(node.outputs)))
for r, s in zip(node.outputs, o_shapes): for r, s in zip(node.outputs, o_shapes):
self.set_shape(r, s) self.set_shape(r, s)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论