mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-30 17:52:35 +06:00
Fix the bug in constructing the all_hidden_states of DeBERTa v2 (#10466)
* fix all_hidden_states * use output_states instead of next_kv
This commit is contained in:
parent
188574ac50
commit
d064fb5647
@ -450,10 +450,11 @@ class DebertaV2Encoder(nn.Module):
|
||||
else:
|
||||
next_kv = hidden_states
|
||||
rel_embeddings = self.get_rel_embedding()
|
||||
output_states = next_kv
|
||||
for i, layer_module in enumerate(self.layer):
|
||||
|
||||
if output_hidden_states:
|
||||
all_hidden_states = all_hidden_states + (hidden_states,)
|
||||
all_hidden_states = all_hidden_states + (output_states,)
|
||||
|
||||
output_states = layer_module(
|
||||
next_kv,
|
||||
|
Loading…
Reference in New Issue
Block a user