Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
805c21ae
"src/lib/vscode:/vscode.git/clone" did not exist on "e700552f93763973854a59ca086963642ec29c79"
Commit
805c21ae
authored
Dec 17, 2019
by
erenup
Browse files
tried to fix the failed checks
parent
d000195e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
transformers/modeling_roberta.py
transformers/modeling_roberta.py
+1
-4
No files found.
transformers/modeling_roberta.py
View file @
805c21ae
...
...
@@ -591,10 +591,7 @@ class RobertaForQuestionAnswering(BertPreTrainedModel):
input_ids = tokenizer.encode(question, text)
start_scores, end_scores = model(torch.tensor([input_ids]))
all_tokens = tokenizer.convert_ids_to_tokens(input_ids)
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
a nice puppet
Note: 'roberta-large' model can not produce the right answer above. Waiting for 'roberta-large-finetuned-squad'
to be uploaded.
answer = ' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1])
"""
config_class
=
RobertaConfig
pretrained_model_archive_map
=
ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment