You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/algorithm/rnn/rnn.rst
+12-8
Original file line number
Diff line number
Diff line change
@@ -202,14 +202,17 @@ After training the model, we can use it to generate sequences. A common practice
202
202
* use :code:`GeneratedInput` for trg_embedding. :code:`GeneratedInput` computes the embedding of the generated token at the last time step for the input at the current time step.
203
203
* use :code:`beam_search` function. This function needs to set:
204
204
205
-
- :code:`id_input`: the integer ID of the data, used to identify the corresponding output in the generated files.
206
-
- :code:`dict_file`: the dictionary file for converting word id to word.
207
205
- :code:`bos_id`: the start token. Every sentence starts with the start token.
208
206
- :code:`eos_id`: the end token. Every sentence ends with the end token.
209
207
- :code:`beam_size`: the beam size used in beam search.
210
208
- :code:`max_length`: the maximum length of the generated sentences.
211
-
- :code:`result_file`: the path of the generation result file.
212
209
210
+
* use :code:`seqtext_printer_evaluator` to print text according to index matrix and dictionary. This function needs to set:
211
+
212
+
- :code:`id_input`: the integer ID of the data, used to identify the corresponding output in the generated files.
213
+
- :code:`dict_file`: the dictionary file for converting word id to word.
214
+
- :code:`result_file`: the path of the generation result file.
0 commit comments