Skip to content

Commit 20b885f

Browse files
authored
Merge pull request #6148 from qingqing01/lstm_doc
Fix the doc of LSTM operator.
2 parents f40bdb1 + d4fcd2a commit 20b885f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

paddle/operators/lstm_op.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class LSTMOpMaker : public framework::OpProtoAndCheckerMaker {
181181
AddComment(R"DOC(
182182
Long-Short Term Memory (LSTM) Operator.
183183
184-
The defalut implementation is diagonal/peephole connection
184+
The defalut implementation is diagonal/peephole connection
185185
(https://arxiv.org/pdf/1402.1128.pdf), the formula is as follows:
186186
187187
$$
@@ -198,27 +198,27 @@ c_t = f_t \odot c_{t-1} + i_t \odot \tilde{c_t} \\
198198
h_t = o_t \odot act_h(c_t)
199199
$$
200200
201-
where the W terms denote weight matrices (e.g. \f$W_{xi}\f$ is the matrix
202-
of weights from the input gate to the input), \f$W_{ic}, W_{fc}, W_{oc}\f$
201+
where the W terms denote weight matrices (e.g. $W_{xi}$ is the matrix
202+
of weights from the input gate to the input), $W_{ic}, W_{fc}, W_{oc}$
203203
are diagonal weight matrices for peephole connections. In our implementation,
204204
we use vectors to reprenset these diagonal weight matrices. The b terms
205-
denote bias vectors (\f$b_i\f$ is the input gate bias vector), \f$\sigma\f$
205+
denote bias vectors ($b_i$ is the input gate bias vector), $\sigma$
206206
is the non-line activations, such as logistic sigmoid function, and
207-
\f$i, f, o\f$ and \f$c\f$ are the input gate, forget gate, output gate,
207+
$i, f, o$ and $c$ are the input gate, forget gate, output gate,
208208
and cell activation vectors, respectively, all of which have the same size as
209-
the cell output activation vector \f$h\f$.
209+
the cell output activation vector $h$.
210210
211-
The \f$\odot\f$ is the element-wise product of the vectors. \f$act_g\f$ and \f$act_h\f$
211+
The $\odot$ is the element-wise product of the vectors. $act_g$ and $act_h$
212212
are the cell input and cell output activation functions and `tanh` is usually
213-
used for them. \f$\tilde{c_t}\f$ is also called candidate hidden state,
213+
used for them. $\tilde{c_t}$ is also called candidate hidden state,
214214
which is computed based on the current input and the previous hidden state.
215215
216-
Set `use_peepholes` False to disable peephole connection
217-
(http://www.bioinf.jku.at/publications/older/2604.pdf). The formula
218-
is omitted here.
216+
Set `use_peepholes` False to disable peephole connection. The formula
217+
is omitted here, please refer to the paper
218+
http://www.bioinf.jku.at/publications/older/2604.pdf for details.
219219
220-
Note that these \f$W_{xi}x_{t}, W_{xf}x_{t}, W_{xc}x_{t}, W_{xo}x_{t}\f$
221-
operations on the input \f$x_{t}\f$ are NOT included in this operator.
220+
Note that these $W_{xi}x_{t}, W_{xf}x_{t}, W_{xc}x_{t}, W_{xo}x_{t}$
221+
operations on the input $x_{t}$ are NOT included in this operator.
222222
Users can choose to use fully-connect operator before LSTM operator.
223223
224224
)DOC");

0 commit comments

Comments
 (0)