Skip to content

Commit ecd51f8

Browse files
committed
docs fixes
1 parent 5aa1f76 commit ecd51f8

File tree

5 files changed

+45
-32
lines changed

5 files changed

+45
-32
lines changed

docs/source/nn.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,12 @@ Loss functions
503503
.. autoclass:: MultiMarginLoss
504504
:members:
505505

506+
:hidden:`TripletMarginLoss`
507+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
508+
509+
.. autoclass:: TripletMarginLoss
510+
:members:
511+
506512

507513
Vision layers
508514
----------------
@@ -838,6 +844,11 @@ Loss functions
838844

839845
.. autofunction:: smooth_l1_loss
840846

847+
:hidden:`triplet_margin_loss`
848+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
849+
850+
.. autofunction:: triplet_margin_loss
851+
841852
Vision functions
842853
----------------
843854

docs/source/sparse.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,33 +55,33 @@ sparse tensors to prevent them from growing too large.
5555

5656
.. class:: FloatTensor()
5757

58-
.. automethod:: add
59-
.. automethod:: add_
60-
.. automethod:: clone
61-
.. automethod:: contiguous
62-
.. automethod:: dim
63-
.. automethod:: div
64-
.. automethod:: div_
65-
.. automethod:: get_device
66-
.. automethod:: hspmm
67-
.. automethod:: indices
68-
.. automethod:: is_contiguous
69-
.. automethod:: mm
70-
.. automethod:: mul
71-
.. automethod:: mul_
72-
.. automethod:: nnz
73-
.. automethod:: resizeAs_
74-
.. automethod:: size
75-
.. automethod:: spadd
76-
.. automethod:: sparse_mask
77-
.. automethod:: spmm
78-
.. automethod:: sspaddmm
79-
.. automethod:: sspmm
80-
.. automethod:: sub
81-
.. automethod:: sub_
82-
.. automethod:: t_
83-
.. automethod:: toDense
84-
.. automethod:: transpose
85-
.. automethod:: transpose_
86-
.. automethod:: values
87-
.. automethod:: zero_
58+
.. method:: add
59+
.. method:: add_
60+
.. method:: clone
61+
.. method:: contiguous
62+
.. method:: dim
63+
.. method:: div
64+
.. method:: div_
65+
.. method:: get_device
66+
.. method:: hspmm
67+
.. method:: indices
68+
.. method:: is_contiguous
69+
.. method:: mm
70+
.. method:: mul
71+
.. method:: mul_
72+
.. method:: nnz
73+
.. method:: resizeAs_
74+
.. method:: size
75+
.. method:: spadd
76+
.. method:: sparse_mask
77+
.. method:: spmm
78+
.. method:: sspaddmm
79+
.. method:: sspmm
80+
.. method:: sub
81+
.. method:: sub_
82+
.. method:: t_
83+
.. method:: toDense
84+
.. method:: transpose
85+
.. method:: transpose_
86+
.. method:: values
87+
.. method:: zero_

torch/nn/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ def triplet_margin_loss(anchor, positive, negative, margin=1.0, p=2, eps=1e-6, s
691691
.. math::
692692
L(a, p, n) = \frac{1}{N} \left( \sum_{i=1}^N \max \{d(a_i, p_i) - d(a_i, n_i) + {\rm margin}, 0\} \right)
693693
694-
where :math: `d(x_i, y_i) = \| {\bf x}_i - {\bf y}_i \|_2^2`.
694+
where :math:`d(x_i, y_i) = \| {\bf x}_i - {\bf y}_i \|_2^2`.
695695
696696
Args:
697697
anchor: anchor input tensor

torch/nn/modules/instancenorm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ class InstanceNorm2d(_InstanceNorm):
105105
eps: a value added to the denominator for numerical stability. Default: 1e-5
106106
momentum: the value used for the running_mean and running_var computation. Default: 0.1
107107
affine: a boolean value that when set to true, gives the layer learnable affine parameters.
108+
108109
Shape:
109110
- Input: :math:`(N, C, H, W)`
110111
- Output: :math:`(N, C, H, W)` (same shape as input)
112+
111113
Examples:
112114
>>> # With Learnable Parameters
113115
>>> m = nn.InstanceNorm2d(100)

torch/nn/modules/loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ class TripletMarginLoss(Module):
448448
.. math::
449449
L(a, p, n) = \frac{1}{N} \left( \sum_{i=1}^N \max \{d(a_i, p_i) - d(a_i, n_i) + {\rm margin}, 0\} \right)
450450
451-
where :math: `d(x_i, y_i) = \| {\bf x}_i - {\bf y}_i \|_2^2`.
451+
where :math:`d(x_i, y_i) = \| {\bf x}_i - {\bf y}_i \|_2^2`.
452452
453453
Args:
454454
anchor: anchor input tensor

0 commit comments

Comments
 (0)