提交 4a81ae74 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Updated doc for tensor.join

- Fixed typo on last line of Python example (y -> u) - Added note that the first argument is the axis - Fixed statement saying it is used to concatenate two tensors, while it can be used with more - Fixed some lines too long (>80 characters)
上级 b135df12
...@@ -1680,11 +1680,12 @@ class Split(Op): ...@@ -1680,11 +1680,12 @@ class Split(Op):
class Join(Op): class Join(Op):
""" """
Concatenate two `TensorVariable`s along some axis. Concatenate multiple `TensorVariable`s along some axis.
These tensors must have the same shape along all dimensions other than this axis. The axis must be given as first argument. All tensors must have the same
Of course, TensorVariable instances don't have a shape, so this error can't be caught until shape along all dimensions other than this axis.
runtime. See `perform()`. Of course, TensorVariable instances do not have a shape, so this error
cannot be caught until runtime. See `perform()`.
For joins involving scalar values, see @stack. For joins involving scalar values, see @stack.
...@@ -1696,7 +1697,7 @@ class Join(Op): ...@@ -1696,7 +1697,7 @@ class Join(Op):
r = join(0, x, y, z) r = join(0, x, y, z)
c = join(1, x, y, z) c = join(1, x, y, z)
join(2, x, y, z) # WRONG: the axis has to be an index into the shape join(2, x, y, z) # WRONG: the axis has to be an index into the shape
join(0, x, y) # WRONG: tensors have to have the same rank to be joined join(0, x, u) # WRONG: joined tensors must have the same rank
""" """
def make_node(self, *axis_and_tensors): def make_node(self, *axis_and_tensors):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论