Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#148 from lcy-seso/fix_parameter_setti…
Browse files Browse the repository at this point in the history
…ng_bugs

fix parameter settings that may cause bugs for users.
  • Loading branch information
lcy-seso authored Jul 7, 2017
2 parents de86560 + 96531a7 commit ebc5f84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generate_sequence_by_rnn_lm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
log_period = 50
save_period_by_batches = 50

use_gpu = True # to use gpu or not
use_gpu = False # to use gpu or not
trainer_count = 1 # number of trainer

################## for model configuration ##################
Expand Down
3 changes: 1 addition & 2 deletions generate_sequence_by_rnn_lm/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def train(topology,
os.mkdir(model_save_dir)

# initialize PaddlePaddle
paddle.init(
use_gpu=conf.use_gpu, gpu_id=3, trainer_count=conf.trainer_count)
paddle.init(use_gpu=conf.use_gpu, trainer_count=conf.trainer_count)

# create optimizer
adam_optimizer = paddle.optimizer.Adam(
Expand Down
2 changes: 1 addition & 1 deletion nmt_without_attention/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ def event_handler(event):


if __name__ == '__main__':
train(save_dir_path="models", source_dict_dim=3000, target_dict_dim=3000)
train(save_dir_path="models", source_dict_dim=30000, target_dict_dim=30000)

0 comments on commit ebc5f84

Please sign in to comment.