From 42e9d7c0042a10b205652ec04d42ef471baeddab Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 10 Apr 2017 10:25:33 +0800 Subject: [PATCH] restore old code of seqToseq_net --- demo/seqToseq/seqToseq_net.py | 6 ++---- demo/seqToseq/translation/train.conf | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/demo/seqToseq/seqToseq_net.py b/demo/seqToseq/seqToseq_net.py index a85928f822d..37a2d648743 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 c0c9ebc6b1d..72b7ccdbb95 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" -- GitLab