Skip to content

Commit

Permalink
fix #858
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwolf committed Jul 23, 2019
1 parent fec76a4 commit 2c9a311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/run_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def load_and_cache_examples(args, task, tokenizer, evaluate=False):
cls_token_at_end=bool(args.model_type in ['xlnet']), # xlnet has a cls token at the end
cls_token=tokenizer.cls_token,
sep_token=tokenizer.sep_token,
cls_token_segment_id=2 if args.model_type in ['xlnet'] else 1,
cls_token_segment_id=2 if args.model_type in ['xlnet'] else 0,
pad_on_left=bool(args.model_type in ['xlnet']), # pad on the left for xlnet
pad_token_segment_id=4 if args.model_type in ['xlnet'] else 0)
if args.local_rank in [-1, 0]:
Expand Down

0 comments on commit 2c9a311

Please sign in to comment.