From 9f3d62cf077f6079918d7721a406b7f302514d26 Mon Sep 17 00:00:00 2001 From: xuezhong Date: Thu, 27 Sep 2018 21:36:28 +0800 Subject: [PATCH] charge default optimizer --- fluid/machine_reading_comprehesion/DuReader/args.py | 2 +- fluid/machine_reading_comprehesion/DuReader/rc_model.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fluid/machine_reading_comprehesion/DuReader/args.py b/fluid/machine_reading_comprehesion/DuReader/args.py index 8b86193a..96422f44 100644 --- a/fluid/machine_reading_comprehesion/DuReader/args.py +++ b/fluid/machine_reading_comprehesion/DuReader/args.py @@ -98,7 +98,7 @@ def parse_args(): "(default: %(default)d)") parser.add_argument( '--optim', - default='rprop', + default='adam', help='optimizer type') parser.add_argument( '--trainset', diff --git a/fluid/machine_reading_comprehesion/DuReader/rc_model.py b/fluid/machine_reading_comprehesion/DuReader/rc_model.py index 0c0f424e..11d5b5d9 100644 --- a/fluid/machine_reading_comprehesion/DuReader/rc_model.py +++ b/fluid/machine_reading_comprehesion/DuReader/rc_model.py @@ -75,6 +75,7 @@ def encoder(input_name, para_name, shape, hidden_size, args): input=input_ids, size=shape, dtype='float32', + is_sparse=True, param_attr=fluid.ParamAttr(name='embedding_para')) encoder_out = bi_lstm_encoder( -- GitLab