"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "50e615f43dd6db52f1f1e826f4047b2adb00c4e5"
Commit 64b2a828 authored by Lei Mao's avatar Lei Mao
Browse files

fix evaluation bug

parent dad3c7a4
...@@ -336,7 +336,9 @@ def main(): ...@@ -336,7 +336,9 @@ def main():
output_args_file = os.path.join(args.output_dir, 'training_args.bin') output_args_file = os.path.join(args.output_dir, 'training_args.bin')
torch.save(args, output_args_file) torch.save(args, output_args_file)
else: else:
model = BertForQuestionAnswering.from_pretrained(args.bert_model) # Load a trained model and vocabulary that you have fine-tuned
model = BertForQuestionAnswering.from_pretrained(args.output_dir)
tokenizer = BertTokenizer.from_pretrained(args.output_dir, do_lower_case=args.do_lower_case)
model.to(device) model.to(device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment