提交 dbe0fe6d 编写于 作者: D dzhwinter

'fix typo'

上级 1f38cbf7
...@@ -2051,15 +2051,25 @@ def layer_norm(input, ...@@ -2051,15 +2051,25 @@ def layer_norm(input,
def beam_search_decode(ids, scores, name=None): def beam_search_decode(ids, scores, name=None):
""" """
This layers is to pack the output of beam search layer into sentences and
associated scores. It is usually called after the beam search layer.
${beam_search_decode} ${beam_search_decode}
Args: Args:
ids (Variable): ${ids_comment} ids (Variable): ${ids_comment}
scores (Variable): ${scores_comment} scores (Variable): ${scores_comment}
name (str): The name of this layer. It is optional. name (str): The name of this layer. It is optional.
Returns: Returns:
tuple: a tuple of two output variable: sentence_ids, sentence_scores tuple(Variable): a tuple of two output variable: sentence_ids, sentence_scores
Examples:
.. code-block:: python
ids, scores = fluid.layers.beam_search(
pre_ids, ids, scores, beam_size, end_id)
sentence_ids, sentence_scores = fluid.layers.beam_search_decode(
ids, scores)
""" """
helper = LayerHelper('beam_search_decode', **locals()) helper = LayerHelper('beam_search_decode', **locals())
sentence_ids = helper.create_tmp_variable(dtype=ids.dtype) sentence_ids = helper.create_tmp_variable(dtype=ids.dtype)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册