提交 a8db81c3 编写于 作者: Q qiaolongfei

reduce fpe of machine_translation

上级 df2ba16e
...@@ -399,7 +399,7 @@ for param in parameters.keys(): ...@@ -399,7 +399,7 @@ for param in parameters.keys():
```python ```python
optimizer = paddle.optimizer.Adam( optimizer = paddle.optimizer.Adam(
learning_rate=5e-5, learning_rate=5e-5,
regularization=paddle.optimizer.L2Regularization(rate=1e-3)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
trainer = paddle.trainer.SGD(cost=cost, trainer = paddle.trainer.SGD(cost=cost,
parameters=parameters, parameters=parameters,
update_equation=optimizer) update_equation=optimizer)
...@@ -423,7 +423,7 @@ for param in parameters.keys(): ...@@ -423,7 +423,7 @@ for param in parameters.keys():
trainer.train( trainer.train(
reader=wmt14_reader, reader=wmt14_reader,
event_handler=event_handler, event_handler=event_handler,
num_passes=10000, num_passes=2,
feeding=feeding) feeding=feeding)
``` ```
......
...@@ -361,7 +361,7 @@ for param in parameters.keys(): ...@@ -361,7 +361,7 @@ for param in parameters.keys():
```python ```python
optimizer = paddle.optimizer.Adam( optimizer = paddle.optimizer.Adam(
learning_rate=5e-5, learning_rate=5e-5,
regularization=paddle.optimizer.L2Regularization(rate=1e-3)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
trainer = paddle.trainer.SGD(cost=cost, trainer = paddle.trainer.SGD(cost=cost,
parameters=parameters, parameters=parameters,
update_equation=optimizer) update_equation=optimizer)
...@@ -388,7 +388,7 @@ for param in parameters.keys(): ...@@ -388,7 +388,7 @@ for param in parameters.keys():
trainer.train( trainer.train(
reader=wmt14_reader, reader=wmt14_reader,
event_handler=event_handler, event_handler=event_handler,
num_passes=10000, num_passes=2,
feeding=feeding) feeding=feeding)
``` ```
......
...@@ -107,7 +107,7 @@ def main(): ...@@ -107,7 +107,7 @@ def main():
# define optimize method and trainer # define optimize method and trainer
optimizer = paddle.optimizer.Adam( optimizer = paddle.optimizer.Adam(
learning_rate=5e-5, learning_rate=5e-5,
regularization=paddle.optimizer.L2Regularization(rate=1e-3)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
trainer = paddle.trainer.SGD( trainer = paddle.trainer.SGD(
cost=cost, parameters=parameters, update_equation=optimizer) cost=cost, parameters=parameters, update_equation=optimizer)
...@@ -137,7 +137,7 @@ def main(): ...@@ -137,7 +137,7 @@ def main():
trainer.train( trainer.train(
reader=wmt14_reader, reader=wmt14_reader,
event_handler=event_handler, event_handler=event_handler,
num_passes=10000, num_passes=2,
feeding=feeding) feeding=feeding)
......
...@@ -441,7 +441,7 @@ for param in parameters.keys(): ...@@ -441,7 +441,7 @@ for param in parameters.keys():
```python ```python
optimizer = paddle.optimizer.Adam( optimizer = paddle.optimizer.Adam(
learning_rate=5e-5, learning_rate=5e-5,
regularization=paddle.optimizer.L2Regularization(rate=1e-3)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
trainer = paddle.trainer.SGD(cost=cost, trainer = paddle.trainer.SGD(cost=cost,
parameters=parameters, parameters=parameters,
update_equation=optimizer) update_equation=optimizer)
...@@ -465,7 +465,7 @@ for param in parameters.keys(): ...@@ -465,7 +465,7 @@ for param in parameters.keys():
trainer.train( trainer.train(
reader=wmt14_reader, reader=wmt14_reader,
event_handler=event_handler, event_handler=event_handler,
num_passes=10000, num_passes=2,
feeding=feeding) feeding=feeding)
``` ```
......
...@@ -403,7 +403,7 @@ for param in parameters.keys(): ...@@ -403,7 +403,7 @@ for param in parameters.keys():
```python ```python
optimizer = paddle.optimizer.Adam( optimizer = paddle.optimizer.Adam(
learning_rate=5e-5, learning_rate=5e-5,
regularization=paddle.optimizer.L2Regularization(rate=1e-3)) regularization=paddle.optimizer.L2Regularization(rate=8e-4))
trainer = paddle.trainer.SGD(cost=cost, trainer = paddle.trainer.SGD(cost=cost,
parameters=parameters, parameters=parameters,
update_equation=optimizer) update_equation=optimizer)
...@@ -430,7 +430,7 @@ for param in parameters.keys(): ...@@ -430,7 +430,7 @@ for param in parameters.keys():
trainer.train( trainer.train(
reader=wmt14_reader, reader=wmt14_reader,
event_handler=event_handler, event_handler=event_handler,
num_passes=10000, num_passes=2,
feeding=feeding) feeding=feeding)
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册