Skip to content

Commit 70d9be0

Browse files
iramazanlifacebook-github-bot
authored andcommitted
Replace duplicative s with alpha (pytorch#56804)
Summary: It is always easier to read a document when different objects / concepts denoted with different variables / representations. In this PR we make sure the [complex autograd](https://pytorch.org/docs/master/notes/autograd.html#autograd-for-complex-numbers) documentation, the variable of output and step size diverge. Fixes pytorch#53633 Pull Request resolved: pytorch#56804 Reviewed By: anjali411 Differential Revision: D27989959 Pulled By: iramazanli fbshipit-source-id: c271590ee744c8aeeff62bfaa2295429765ef64e
1 parent d4707e2 commit 70d9be0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/source/notes/autograd.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,22 +330,22 @@ How is Wirtinger Calculus useful in optimization?
330330
Researchers in audio and other fields, more commonly, use gradient
331331
descent to optimize real valued loss functions with complex variables.
332332
Typically, these people treat the real and imaginary values as separate
333-
channels that can be updated. For a step size :math:`s/2` and loss
333+
channels that can be updated. For a step size :math:`\alpha/2` and loss
334334
:math:`L`, we can write the following equations in :math:`ℝ^2`:
335335

336336
.. math::
337337
\begin{aligned}
338-
x_{n+1} &= x_n - (s/2) * \frac{\partial L}{\partial x} \\
339-
y_{n+1} &= y_n - (s/2) * \frac{\partial L}{\partial y}
338+
x_{n+1} &= x_n - (\alpha/2) * \frac{\partial L}{\partial x} \\
339+
y_{n+1} &= y_n - (\alpha/2) * \frac{\partial L}{\partial y}
340340
\end{aligned}
341341
342342
How do these equations translate into complex space :math:`ℂ`?
343343

344344
.. math::
345345
\begin{aligned}
346-
z_{n+1} &= x_n - (s/2) * \frac{\partial L}{\partial x} + 1j * (y_n - (s/2) * \frac{\partial L}{\partial y}) \\
347-
&= z_n - s * 1/2 * (\frac{\partial L}{\partial x} + j \frac{\partial L}{\partial y}) \\
348-
&= z_n - s * \frac{\partial L}{\partial z^*}
346+
z_{n+1} &= x_n - (\alpha/2) * \frac{\partial L}{\partial x} + 1j * (y_n - (\alpha/2) * \frac{\partial L}{\partial y}) \\
347+
&= z_n - \alpha * 1/2 * (\frac{\partial L}{\partial x} + j \frac{\partial L}{\partial y}) \\
348+
&= z_n - \alpha * \frac{\partial L}{\partial z^*}
349349
\end{aligned}
350350
351351
Something very interesting has happened: Wirtinger calculus tells us

0 commit comments

Comments
 (0)