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
95f792af
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b93569457fd758a60f15d94ac7b3ba3a245096c0"
Unverified
Commit
95f792af
authored
Oct 04, 2020
by
Sylvain Gugger
Committed by
GitHub
Oct 04, 2020
Browse files
Remove labels from the RagModel example (#7560)
parent
99cb924b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_rag.py
src/transformers/modeling_rag.py
+1
-1
No files found.
src/transformers/modeling_rag.py
View file @
95f792af
...
@@ -537,7 +537,7 @@ class RagModel(RagPreTrainedModel):
...
@@ -537,7 +537,7 @@ class RagModel(RagPreTrainedModel):
>>> input_dict = tokenizer.prepare_seq2seq_batch("How many people live in Paris?", "In Paris, there are 10 million people.", return_tensors="pt")
>>> input_dict = tokenizer.prepare_seq2seq_batch("How many people live in Paris?", "In Paris, there are 10 million people.", return_tensors="pt")
>>> input_ids = input_dict["input_ids"]
>>> input_ids = input_dict["input_ids"]
>>> outputs = model(input_ids=input_ids
, labels=input_dict["labels"]
)
>>> outputs = model(input_ids=input_ids)
"""
"""
use_cache
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
use_cache
use_cache
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
use_cache
...
...
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