Skip to content

Commit 8c41665

Browse files
authored
refine bsd doc (#48882)
1 parent 93acef3 commit 8c41665

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

python/paddle/nn/decode.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
class Decoder:
2828
"""
29-
:api_attr: Static Graph
30-
3129
Decoder is the base class for any decoder instance used in `dynamic_decode`.
3230
It provides interface for output generation for one time step, which can be
3331
used to generate sequences.
@@ -146,13 +144,14 @@ class BeamSearchDecoder(Decoder):
146144
Please refer to `Beam search <https://en.wikipedia.org/wiki/Beam_search>`_
147145
for more details.
148146
149-
**NOTE** When decoding with beam search, the `inputs` and `states` of cell
150-
would be tiled to `beam_size` (unsqueeze and tile), resulting to shapes like
151-
`[batch_size * beam_size, ...]` , which is built into `BeamSearchDecoder` and
152-
done automatically. Thus any other tensor with shape `[batch_size, ...]` used
153-
in `cell.call` needs to be tiled manually first, which can be completed by using
154-
:code:`BeamSearchDecoder.tile_beam_merge_with_batch` . The most common case
155-
for this is the encoder output in attention mechanism.
147+
Note:
148+
When decoding with beam search, the `inputs` and `states` of cell
149+
would be tiled to `beam_size` (unsqueeze and tile), resulting to shapes like
150+
`[batch_size * beam_size, ...]` , which is built into `BeamSearchDecoder` and
151+
done automatically. Thus any other tensor with shape `[batch_size, ...]` used
152+
in `cell.call` needs to be tiled manually first, which can be completed by using
153+
:code:`BeamSearchDecoder.tile_beam_merge_with_batch` . The most common case
154+
for this is the encoder output in attention mechanism.
156155
157156
Returns:
158157
BeamSearchDecoder: An instance of decoder which can be used in \

0 commit comments

Comments
 (0)