diff --git a/fluid/DeepASR/tools/profile.py b/fluid/DeepASR/tools/profile.py index 9d0b47694273345357726ad51062d01ff01b120d..49884844215b2eeec91143dc187e8336cc5f3129 100644 --- a/fluid/DeepASR/tools/profile.py +++ b/fluid/DeepASR/tools/profile.py @@ -49,7 +49,7 @@ def parse_args(): parser.add_argument( '--learning_rate', type=float, - default=0.002, + default=0.00016, help='Learning rate used to train. (default: %(default)f)') parser.add_argument( '--device', @@ -125,8 +125,7 @@ def profile(args): class_num=1749, parallel=args.parallel) - optimizer = fluid.optimizer.Momentum( - learning_rate=args.learning_rate, momentum=0.9) + optimizer = fluid.optimizer.Adam(learning_rate=args.learning_rate) optimizer.minimize(avg_cost) place = fluid.CPUPlace() if args.device == 'CPU' else fluid.CUDAPlace(0) diff --git a/fluid/DeepASR/train.py b/fluid/DeepASR/train.py index b5d2239e94dd5ddcd79d0245e4b980d6cf5bfbf4..1876927fa7dcc57811125b8936f184ebc0f87e07 100644 --- a/fluid/DeepASR/train.py +++ b/fluid/DeepASR/train.py @@ -58,7 +58,7 @@ def parse_args(): parser.add_argument( '--learning_rate', type=float, - default=0.002, + default=0.00016, help='Learning rate used to train. (default: %(default)f)') parser.add_argument( '--device', @@ -143,8 +143,7 @@ def train(args): class_num=1749, parallel=args.parallel) - optimizer = fluid.optimizer.Momentum( - learning_rate=args.learning_rate, momentum=0.9) + optimizer = fluid.optimizer.Adam(learning_rate=args.learning_rate) optimizer.minimize(avg_cost) # program for test