Skip to content

Commit

Permalink
Fix formatting issues in torch.tensor_split documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtamohler committed Oct 14, 2020
1 parent 635aebd commit 70247c6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions torch/_torch_docs.py
Expand Up @@ -1223,7 +1223,7 @@ def merge_dicts(*dicts):
Splits a tensor into multiple sub-tensors, all of which are views of :attr:`input`,
along dimension :attr:`dim` according to the indices or number of sections specified
by :attr:`indices_or_sections. This function is based on NumPy's
by :attr:`indices_or_sections`. This function is based on NumPy's
:func:`numpy.array_split`.
Args:
Expand All @@ -1239,11 +1239,8 @@ def merge_dicts(*dicts):
If :attr:`indices_or_sections` is a list of ints, :attr:`input` is split along
dimension :attr:`dim` at each of the indices in the list. For instance,
:code:`[2, 3]` and :code:`dim=0` would result in the following tensors:
- :code:`input[:2]`
- :code:`input[2:3]`
- :code:`input[3:]`
:code:`indices_or_sections=[2, 3]` and :code:`dim=0` would result in the tensors
:code:`input[:2]`, :code:`input[2:3]`, and :code:`input[3:]`.
dim (int, optional): dimension along which to split the tensor. Default: ``0``
Expand Down

0 comments on commit 70247c6

Please sign in to comment.