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
0083b149
Unverified
Commit
0083b149
authored
Apr 26, 2023
by
Sylvain Gugger
Committed by
GitHub
Apr 26, 2023
Browse files
🚨
🚨
🚨
Use default ignore index in Luke (#23014)
Use default ignore index in Luke
parent
8b129030
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/luke/modeling_luke.py
src/transformers/models/luke/modeling_luke.py
+1
-1
No files found.
src/transformers/models/luke/modeling_luke.py
View file @
0083b149
...
@@ -1298,7 +1298,7 @@ class LukeForMaskedLM(LukePreTrainedModel):
...
@@ -1298,7 +1298,7 @@ class LukeForMaskedLM(LukePreTrainedModel):
self
.
lm_head
=
LukeLMHead
(
config
)
self
.
lm_head
=
LukeLMHead
(
config
)
self
.
entity_predictions
=
EntityPredictionHead
(
config
)
self
.
entity_predictions
=
EntityPredictionHead
(
config
)
self
.
loss_fn
=
nn
.
CrossEntropyLoss
(
ignore_index
=-
1
)
self
.
loss_fn
=
nn
.
CrossEntropyLoss
()
# Initialize weights and apply final processing
# Initialize weights and apply final processing
self
.
post_init
()
self
.
post_init
()
...
...
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