Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix minor math equation rendering format in NDArray API doc strings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
imsheridan authored and piiswrong committed Apr 9, 2018
1 parent 694bf49 commit cfaca3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/operator/contrib/krprod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ the (column-wise) Khatri-Rao product is defined as the matrix,
.. math::
X = A_1 \otimes \cdots \otimes A_n \in \mathbb{R}^{(M_1 \cdots M_n) \times N},
where the :math:`k`th column is equal to the column-wise outer product
where the :math:`k` th column is equal to the column-wise outer product
:math:`{A_1}_k \otimes \cdots \otimes {A_n}_k` where :math:`{A_i}_k` is the kth
column of the ith matrix.
Expand Down
7 changes: 4 additions & 3 deletions src/operator/optimizer_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ DMLC_REGISTER_PARAMETER(AdagradParam);

NNVM_REGISTER_OP(signsgd_update)
.describe(R"code(Update function for SignSGD optimizer.
.. math::
g_t = \nabla J(W_{t-1})\\
W_t = W_{t-1} - \eta_t \text{sign}(g_t)}
W_t = W_{t-1} - \eta_t \text{sign}(g_t)
It updates the weights using::
Expand All @@ -72,7 +73,7 @@ NNVM_REGISTER_OP(signum_update)
g_t = \nabla J(W_{t-1})\\
m_t = \beta m_{t-1} + (1 - \beta) g_t\\
W_t = W_{t-1} - \eta_t \text{sign}(m_t)}
W_t = W_{t-1} - \eta_t \text{sign}(m_t)
It updates the weights using::
state = momentum * state + (1-momentum) * gradient
Expand Down Expand Up @@ -398,7 +399,7 @@ available at http://proceedings.mlr.press/v70/zheng17a/zheng17a.pdf.
g_t = \nabla J(W_{t-1})\\
v_t = \beta_2 v_{t-1} + (1 - \beta_2) g_t^2\\
d_t = \frac{ (1 - \beta_1^t) }{ \eta_t } (\sqrt{ \frac{ v_t }{ 1 - \beta_2^t } } + \epsilon)
d_t = \frac{ 1 - \beta_1^t }{ \eta_t } (\sqrt{ \frac{ v_t }{ 1 - \beta_2^t } } + \epsilon)
\sigma_t = d_t - \beta_1 d_{t-1}
z_t = \beta_1 z_{ t-1 } + (1 - \beta_1^t) g_t - \sigma_t W_{t-1}
W_t = - \frac{ z_t }{ d_t }
Expand Down
2 changes: 1 addition & 1 deletion src/operator/regression_output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The logistic function, also known as the sigmoid function, is computed as
:math:`\frac{1}{1+exp(-\textbf{x})}`.
Commonly, the sigmoid is used to squash the real-valued output of a linear model
:math:wTx+b into the [0,1] range so that it can be interpreted as a probability.
:math:`wTx+b` into the [0,1] range so that it can be interpreted as a probability.
It is suitable for binary classification or probability prediction tasks.
.. note::
Expand Down

0 comments on commit cfaca3d

Please sign in to comment.