未验证 提交 06ab0c69 编写于 作者: Y Yibing Liu 提交者: GitHub

Merge pull request #1220 from kuke/act_ner_ce

Activate ce of sequence_tagging_for_ner
......@@ -7,9 +7,9 @@ from kpi import CostKpi, DurationKpi, AccKpi
#### NOTE kpi.py should shared in models in some way!!!!
train_acc_kpi = AccKpi('train_precision', 0.005, actived=False)
test_acc_kpi = CostKpi('test_precision', 0.005, actived=False)
train_duration_kpi = DurationKpi('train_duration', 0.05, actived=True)
train_acc_kpi = AccKpi('train_precision', 0.005, 0, actived=True)
test_acc_kpi = CostKpi('test_precision', 0.005, 0, actived=True)
train_duration_kpi = DurationKpi('train_duration', 0.05, 0, actived=True)
tracking_kpis = [
train_acc_kpi,
......
......@@ -55,6 +55,9 @@ def main(train_data_file,
word_dict_len = len(word_dict)
label_dict_len = len(label_dict)
if "CE_MODE_X" in os.environ:
fluid.default_startup_program().random_seed = 110
avg_cost, feature_out, word, mark, target = ner_net(
word_dict_len, label_dict_len, parallel)
......@@ -98,8 +101,6 @@ def main(train_data_file,
feeder = fluid.DataFeeder(feed_list=[word, mark, target], place=place)
exe = fluid.Executor(place)
if "CE_MODE_X" in os.environ:
fluid.default_startup_program().random_seed = 110
exe.run(fluid.default_startup_program())
embedding_name = 'emb'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册