mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 19:21:31 +06:00
🚨🚨🚨 Use default ignore index in Luke (#23014)
Use default ignore index in Luke
This commit is contained in:
parent
8b129030cb
commit
0083b149e9
@ -1298,7 +1298,7 @@ class LukeForMaskedLM(LukePreTrainedModel):
|
||||
self.lm_head = LukeLMHead(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
|
||||
self.post_init()
|
||||
|
Loading…
Reference in New Issue
Block a user