working on automodels
This commit is contained in:
1 parent
58830807d1
commit
b90e29d52c
6 files changed
+289
-14
No files matched your search
@@ -134,7 +134,7 @@ def train(args, train_dataset, model, tokenizer):
|
||||
'end_positions': batch[4]}
|
||||
if args.model_type in ['xlnet', 'xlm']:
|
||||
inputs.update({'cls_index': batch[5],
|
||||
'p_mask': batch[6]})
|
||||
'p_mask': batch[6]})
|
||||
outputs = model(**inputs)
|
||||
loss = outputs[0] # model outputs are always tuple in pytorch-transformers (see doc)
|
||||
|
||||
|
||||
Reference in new issue
Block a user