diff --git a/demo/seqToseq/seqToseq_net.py b/demo/seqToseq/seqToseq_net.py index a85928f822d86eb44a32467865248416354a1a16..37a2d648743e16ca12a79f9ad6006ba4d93da276 100644 --- a/demo/seqToseq/seqToseq_net.py +++ b/demo/seqToseq/seqToseq_net.py @@ -81,10 +81,8 @@ def gru_encoder_decoder(data_conf, """ for k, v in data_conf.iteritems(): globals()[k] = v - #source_dict_dim = len(open(src_dict_path, "r").readlines()) - #target_dict_dim = len(open(trg_dict_path, "r").readlines()) - source_dict_dim = 1000 - target_dict_dim = 2000 + source_dict_dim = len(open(src_dict_path, "r").readlines()) + target_dict_dim = len(open(trg_dict_path, "r").readlines()) gen_trans_file = gen_result src_word_id = data_layer(name='source_language_word', size=source_dict_dim) diff --git a/demo/seqToseq/translation/train.conf b/demo/seqToseq/translation/train.conf index c0c9ebc6b1d66f46491cf816ac63bf9a80c0b64b..72b7ccdbb95dbda8f06674079db9a3257bb31622 100644 --- a/demo/seqToseq/translation/train.conf +++ b/demo/seqToseq/translation/train.conf @@ -19,8 +19,7 @@ sys.path.append("..") from seqToseq_net import * # whether this config is used for generating -#is_generating = False -is_generating = True +is_generating = False ### Data Definiation data_dir = "./data/pre-wmt14"