From c1c7d8eb7be6968a54c28722cd17c02d3a6ecb07 Mon Sep 17 00:00:00 2001 From: Zeyao Du <330501241@qq.com> Date: Sat, 9 Nov 2019 21:03:06 +0800 Subject: [PATCH] bugfix --- eval.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eval.py b/eval.py index 889571c..14124ab 100644 --- a/eval.py +++ b/eval.py @@ -52,16 +52,15 @@ def main(): parser.add_argument('--num_pieces', default=100, type=int, required=False, help='将训练语料分成多少份') parser.add_argument('--min_length', default=128, type=int, required=False, help='最短收录文章长度') parser.add_argument('--pretrained_model', default='', type=str, required=False, help='模型起点路径') - parser.add_argument('--no_wordpiece', action='store_true', help='不做word piece切词') parser.add_argument('--output_dir', default='eval_result/', type=str, required=False, help='结果输出路径') args = parser.parse_args() print('args:\n' + args.__repr__()) - if args.no_wordpiece: - from tokenizations import tokenization_bert_without_wordpiece as tokenization_bert - else: - from tokenizations import tokenization_bert + # if args.no_wordpiece: + # from tokenizations import tokenization_bert_without_wordpiece as tokenization_bert + # else: + from tokenizations import tokenization_bert os.environ["CUDA_VISIBLE_DEVICES"] = args.device # 此处设置程序使用哪些显卡