Flansma commited on
Commit
d91846c
·
verified ·
1 Parent(s): c1a5361

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. modeling_helmbert.py +2 -2
modeling_helmbert.py CHANGED
@@ -559,7 +559,7 @@ class HELMBertEncoder(nn.Module):
559
  all_attentions = () if output_attentions else None
560
 
561
  # Store for nGiE
562
- ngie_input_states = hidden_states.clone()
563
 
564
  # [batch, seq, hidden] -> [seq, batch, hidden]
565
  hidden_states = hidden_states.transpose(0, 1)
@@ -594,7 +594,7 @@ class HELMBertEncoder(nn.Module):
594
 
595
  # Store layer[-2] for EMD
596
  if use_emd and layer_idx == num_layers - 2:
597
- layer_minus_2 = hidden_states.clone()
598
 
599
  # Convert back to [batch, seq, hidden]
600
  hidden_states = hidden_states.transpose(0, 1)
 
559
  all_attentions = () if output_attentions else None
560
 
561
  # Store for nGiE
562
+ ngie_input_states = hidden_states
563
 
564
  # [batch, seq, hidden] -> [seq, batch, hidden]
565
  hidden_states = hidden_states.transpose(0, 1)
 
594
 
595
  # Store layer[-2] for EMD
596
  if use_emd and layer_idx == num_layers - 2:
597
+ layer_minus_2 = hidden_states
598
 
599
  # Convert back to [batch, seq, hidden]
600
  hidden_states = hidden_states.transpose(0, 1)