@@ -190,7 +190,7 @@ class RecurrentGradientMachine : public NeuralNetwork {
190190 std::vector<int > ids;
191191
192192 /* *
193- * @brief idsProb, log probability of each generated words .
193+ * @brief idsProb, log probability of each generated word .
194194 */
195195 std::vector<real> idsProb;
196196
@@ -472,16 +472,42 @@ class RecurrentGradientMachine : public NeuralNetwork {
472472 void copyDataOutlinkFrame (size_t machineCur);
473473
474474 /*
475- * @brief In generation, if the layer group has more than 1 outlink, outlinks
476- * except the first one are data outlinks. This function creates the data
477- * outlinks.
478- * @note In beam search, only one generated sequence with the hightest log
479- * probabilites are retained.
475+ * @brief In generation, if the layer group has more than 1 outlink, outlink
476+ * except the first one is a data outlink. In RecurrentLayerGroup, each time
477+ * step is a separate Network, outputs of a layer inside the
478+ * RecurrentLayerGroup are stored in separate Arguments. If one layer is
479+ * specified as an outlink of RecurrentLayerGroup. This function will
480+ * collect outputs in each time step of each generated sequence which are
481+ * dispersed in separate Arguments to form a new single Argument as output of
482+ * RecurrentLayerGroup.
480483 */
481484 void createDataOutlink ();
485+
486+ /*
487+ * @brief decide to select how many rows from the Matrix stored the forward
488+ * pass results from a start position.
489+ *
490+ * @param isSeq: a flag indicating whetehr the layer to be output of the
491+ * RecurrentGradientMachine is a sequence or not
492+ * @param outArgs: all of the the returned Arguments of the forward pass
493+ * during the generation process.
494+ * @param copySize: the returned result, number of rows to select from the
495+ * Matrix stored the forward pass results from a start position.
496+ */
482497 void createDataOutlinkCopySizeInfo (bool isSeq,
483498 std::vector<Argument>& outArgs,
484499 std::vector<int >& copySize);
500+
501+ /*
502+ * @brief decide index of the start row for each time step of a generated
503+ * sequence in Matrix stored the entire beam search batch's forward pass
504+ * results.
505+ *
506+ * @param isSeq: a flag indicating whetehr the layer to be output of the
507+ * RecurrentGradientMachine is a sequence or not
508+ * @param outArgs: all of the the returned Arguments of the forward pass
509+ * during the generation process.
510+ */
485511 void createDataOutlinkSelRowsInfo (bool isSeq, std::vector<Argument>& outArgs);
486512
487513 /*
0 commit comments