Fixed typo in migration guide

This commit is contained in:
Christopher Goh 2019-08-07 02:19:14 +08:00
parent 4fc9f9ef54
commit a6f412da01

View File

@ -314,7 +314,7 @@ loss = outputs[0]
# In pytorch-transformers you can also have access to the logits:
loss, logits = outputs[:2]
# And even the attention weigths if you configure the model to output them (and other outputs too, see the docstrings and documentation)
# And even the attention weights if you configure the model to output them (and other outputs too, see the docstrings and documentation)
model = BertForSequenceClassification.from_pretrained('bert-base-uncased', output_attentions=True)
outputs = model(input_ids, labels=labels)
loss, logits, attentions = outputs