mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
[Doc] Add Tensor.Shape (#104750)
Summary: Add `Tensor.Shape` doc. Fix: #104038 Ref: - https://github.com/pytorch/pytorch/issues/5544 - https://github.com/pytorch/pytorch/issues/1980 Differential Revision: D47278630 CC: @svekars @carljparker Pull Request resolved: https://github.com/pytorch/pytorch/pull/104750 Approved by: https://github.com/mikaylagawarecki
This commit is contained in:
parent
28a4fc8d8a
commit
c0c208516b
2 changed files with 21 additions and 0 deletions
|
|
@ -622,6 +622,7 @@ Tensor class reference
|
|||
Tensor.asinh_
|
||||
Tensor.arcsinh
|
||||
Tensor.arcsinh_
|
||||
Tensor.shape
|
||||
Tensor.size
|
||||
Tensor.slogdet
|
||||
Tensor.slice_scatter
|
||||
|
|
|
|||
|
|
@ -4727,6 +4727,26 @@ Example::
|
|||
""",
|
||||
)
|
||||
|
||||
add_docstr_all(
|
||||
"shape",
|
||||
r"""
|
||||
shape() -> torch.Size
|
||||
|
||||
Returns the size of the :attr:`self` tensor. Alias for :attr:`size`.
|
||||
|
||||
See also :meth:`Tensor.size`.
|
||||
|
||||
Example::
|
||||
|
||||
>>> t = torch.empty(3, 4, 5)
|
||||
>>> t.size()
|
||||
torch.Size([3, 4, 5])
|
||||
>>> t.shape
|
||||
torch.Size([3, 4, 5])
|
||||
|
||||
""",
|
||||
)
|
||||
|
||||
add_docstr_all(
|
||||
"sort",
|
||||
r"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue