diff --git a/demo/sentiment/train_with_new_api.py b/demo/sentiment/train_with_new_api.py index 59a303c0d58a02aa4b8246c757d27d45df71d38a..bec07de92a13a830203da66e5ec411318ca374a4 100644 --- a/demo/sentiment/train_with_new_api.py +++ b/demo/sentiment/train_with_new_api.py @@ -160,7 +160,10 @@ if __name__ == '__main__': # create parameters parameters = paddle.parameters.create(cost) - adam_optimizer = paddle.optimizer.Adam(learning_rate=0.01) + adam_optimizer = paddle.optimizer.Adam( + learning_rate=2e-3, + regularization=paddle.optimizer.L2Regularization(rate=8e-4), + model_average=paddle.optimizer.ModelAverage(average_window=0.5)) def event_handler(event): if isinstance(event, paddle.event.EndIteration):