@@ -215,6 +215,7 @@ This subset has 193319 instances of training data and 6003 instances of test dat
...
@@ -215,6 +215,7 @@ This subset has 193319 instances of training data and 6003 instances of test dat
```python
```python
importsys
importsys
importpaddle.v2aspaddle
importpaddle.v2aspaddle
importnumpyasnp
# train with a single CPU
# train with a single CPU
paddle.init(use_gpu=False,trainer_count=1)
paddle.init(use_gpu=False,trainer_count=1)
...
@@ -326,7 +327,7 @@ is_generating = False
...
@@ -326,7 +327,7 @@ is_generating = False
returnout
returnout
```
```
4. Define the name for the decoder and the first two input for `gru_decoder_with_attention`. Note that `StaticInput` is used for the two inputs. Please refer to [StaticInput Document](https://github.com/PaddlePaddle/Paddle/blob/develop/doc/v2/howto/rnn/recurrent_group_en.md#input) for more details.
1. Define the name for the decoder and the first two input for `gru_decoder_with_attention`. Note that `StaticInput` is used for the two inputs. Please refer to [StaticInput Document](https://github.com/PaddlePaddle/Paddle/blob/develop/doc/v2/howto/rnn/recurrent_group_cn.md#input) for more details.