提交 503d40a7 编写于 作者: G guosheng

Fix example code of DynamicDecode in hapi.text.

text=develop
上级 f1b6a68b
...@@ -1808,6 +1808,8 @@ class DynamicDecode(Layer): ...@@ -1808,6 +1808,8 @@ class DynamicDecode(Layer):
from paddle.fluid.layers import BeamSearchDecoder from paddle.fluid.layers import BeamSearchDecoder
from paddle.incubate.hapi.text import StackedLSTMCell, DynamicDecode from paddle.incubate.hapi.text import StackedLSTMCell, DynamicDecode
paddle.enable_dygraph()
vocab_size, d_model, = 100, 32 vocab_size, d_model, = 100, 32
encoder_output = paddle.rand((2, 4, d_model)) encoder_output = paddle.rand((2, 4, d_model))
trg_embeder = fluid.dygraph.Embedding(size=[vocab_size, d_model]) trg_embeder = fluid.dygraph.Embedding(size=[vocab_size, d_model])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册