add more functions to docs

This commit is contained in:
Soumith Chintala 2017-03-29 01:29:17 -04:00
parent 22b3600f19
commit 2979f4b989
4 changed files with 22 additions and 2 deletions

View File

@ -383,6 +383,15 @@ Sparse layers
.. autoclass:: Embedding
:members:
Distance functions
----------------------------------
:hidden:`PairwiseDistance`
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: PairwiseDistance
:members:
Loss functions
----------------------------------
@ -774,6 +783,15 @@ Dropout functions
.. autofunction:: dropout
Distance functions
----------------------------------
:hidden:`pairwise_distance`
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pairwise_distance
Loss functions
--------------

View File

@ -160,6 +160,8 @@ BLAS and LAPACK Operations
.. autofunction:: addr
.. autofunction:: baddbmm
.. autofunction:: bmm
.. autofunction:: btrifact
.. autofunction:: btrisolve
.. autofunction:: dot
.. autofunction:: eig
.. autofunction:: gels

View File

@ -639,7 +639,7 @@ def pairwise_distance(x1, x2, p=2, eps=1e-6):
Shape:
- Input: :math:`(N, D)` where `D = vector dimension`
- Output: :math:`(N, 1)
- Output: :math:`(N, 1)`
>>> input1 = autograd.Variable(torch.randn(100, 128))
>>> input2 = autograd.Variable(torch.randn(100, 128))

View File

@ -16,7 +16,7 @@ class PairwiseDistance(Module):
Shape:
- Input: :math:`(N, D)` where `D = vector dimension`
- Output: :math:`(N, 1)
- Output: :math:`(N, 1)`
>>> pdist = nn.PairwiseDistance(2)
>>> input1 = autograd.Variable(torch.randn(100, 128))