提交 4d0624b6 编写于 作者: M malin10

debug

上级 05b1b890
......@@ -111,8 +111,7 @@ class SingleTrainer(TranspileTrainer):
dataset=dataset,
fetch_list=self.fetch_vars,
fetch_info=self.fetch_alias,
print_period=1,
debug=True)
print_period=self.fetch_period)
self.save(i, "train", is_fleet=False)
context['status'] = 'infer_pass'
......
......@@ -40,16 +40,18 @@ class TranspileTrainer(Trainer):
if state == "TRAIN":
dataloader = self.model._data_loader
namespace = "train.reader"
class_name = "TrainReader"
else:
dataloader = self.model._infer_data_loader
namespace = "evaluate.reader"
class_name = "EvaluateReader"
batch_size = envs.get_global_env("batch_size", None, namespace)
reader_class = envs.get_global_env("class", None, namespace)
reader = dataloader_instance.dataloader(reader_class, state, self._config_yaml)
reader_class = envs.lazy_instance_by_fliename(reader_class, "TrainReader")
reader_class = envs.lazy_instance_by_fliename(reader_class, class_name)
reader_ins = reader_class(self._config_yaml)
if hasattr(reader_ins,'generate_batch_from_trainfiles'):
dataloader.set_sample_list_generator(reader)
......
......@@ -15,7 +15,7 @@ evaluate:
workspace: "fleetrec.models.recall.word2vec"
reader:
batch_size: 50
class: "{workspace}/../w2v_evaluate_reader.py"
class: "{workspace}/w2v_evaluate_reader.py"
test_data_path: "{workspace}/data/test"
word_id_dict_path: "{workspace}/data/dict/word_id_dict.txt"
......@@ -29,16 +29,14 @@ train:
reader:
batch_size: 100
class: "{workspace}/../w2v_reader.py"
class: "{workspace}/w2v_reader.py"
train_data_path: "{workspace}/data/train"
test_data_path: "{workspace}/data/test"
word_count_dict_path: "{workspace}/data/dict/word_count_dict.txt"
word_id_dict_path: "{workspace}/data/dict/word_id_dict.txt"
model:
models: "{workspace}/model.py"
hyper_parameters:
sparse_feature_number: 354051
sparse_feature_number: 85
sparse_feature_dim: 300
with_shuffle_batch: False
neg_num: 5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册