提交 39772545 编写于 作者: W weixing02

fix 08.machine_translation/README.cn.md

上级 f4b5cc83
...@@ -173,6 +173,7 @@ $$e_{ij} = {align(z_i, h_j)}$$ ...@@ -173,6 +173,7 @@ $$e_{ij} = {align(z_i, h_j)}$$
# 加载 paddle的python包 # 加载 paddle的python包
import sys import sys
import paddle.v2 as paddle import paddle.v2 as paddle
import numpy as np
# 配置只使用cpu,并且使用一个cpu进行训练 # 配置只使用cpu,并且使用一个cpu进行训练
paddle.init(use_gpu=False, trainer_count=1) paddle.init(use_gpu=False, trainer_count=1)
...@@ -273,11 +274,11 @@ is_generating = False ...@@ -273,11 +274,11 @@ is_generating = False
output_mem=decoder_mem, output_mem=decoder_mem,
size=decoder_size) size=decoder_size)
out = paddle.layer.mixed( out = paddle.layer.fc(
size=target_dict_dim, size=target_dict_dim,
bias_attr=True, bias_attr=True,
act=paddle.activation.Softmax(), act=paddle.activation.Softmax(),
input=paddle.layer.full_matrix_projection(input=gru_step)) input=gru_step)
return out return out
``` ```
......
...@@ -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
import sys import sys
import paddle.v2 as paddle import paddle.v2 as paddle
import numpy as np
# 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册