update doc

This commit is contained in:
VictorSanh 2019-05-31 01:04:16 -04:00
parent 98f5c7864f
commit 45d21502f0

View File

@ -146,6 +146,7 @@ def openAIGPTLMHeadModel(*args, **kwargs):
# Get the predicted last token
>>> predicted_index = torch.argmax(predictions[0, -1, :]).item()
>>> predicted_token = tokenizer.convert_ids_to_tokens([predicted_index])[0]
'.</w>'
"""
model = OpenAIGPTLMHeadModel.from_pretrained(*args, **kwargs)
return model