Skip to content

Commit 459cff9

Browse files
weiyangfbfacebook-github-bot
authored andcommitted
fix math formula for conv1d and conv2d (pytorch#12740)
Summary: - fix math formula - test plan: build html and view on a browser Pull Request resolved: pytorch#12740 Differential Revision: D10419430 Pulled By: weiyangfb fbshipit-source-id: b8eee9e75c3ce6e37535e3de597431ef5030e9ac
1 parent e027f7a commit 459cff9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

torch/nn/modules/conv.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class Conv1d(_ConvNd):
7171
precisely described as:
7272
7373
.. math::
74-
\op{out}(N_i, C_{\text{out}_j}) = \op{bias}(C_{\text{out}_j}) +
75-
\sum_{k = 0}^{C_{in} - 1} \op{weight}(C_{\text{out}_j}, k)
76-
\star \op{input}(N_i, k)
74+
\text{out}(N_i, C_{\text{out}_j}) = \text{bias}(C_{\text{out}_j}) +
75+
\sum_{k = 0}^{C_{in} - 1} \text{weight}(C_{\text{out}_j}, k)
76+
\star \text{input}(N_i, k)
7777
7878
where :math:`\star` is the valid `cross-correlation`_ operator,
7979
:math:`N` is a batch size, :math:`C` denotes a number of channels,
@@ -190,8 +190,8 @@ class Conv2d(_ConvNd):
190190
can be precisely described as:
191191
192192
.. math::
193-
\op{out}(N_i, C_{\text{out}_j}) = \op{bias}(C_{\text{out}_j}) +
194-
\sum_{k = 0}^{C_{\text{in}} - 1} \op{weight}(C_{\text{out}_j}, k) \star \op{input}(N_i, k)
193+
\text{out}(N_i, C_{\text{out}_j}) = \text{bias}(C_{\text{out}_j}) +
194+
\sum_{k = 0}^{C_{\text{in}} - 1} \text{weight}(C_{\text{out}_j}, k) \star \text{input}(N_i, k)
195195
196196
197197
where :math:`\star` is the valid 2D `cross-correlation`_ operator,

0 commit comments

Comments
 (0)