nielsr HF staff commited on
Commit
97c8408
1 Parent(s): 77a0d59

Add print statements

Browse files
Files changed (1) hide show
  1. modeling_cogvlm.py +4 -0
modeling_cogvlm.py CHANGED
@@ -676,6 +676,10 @@ class CogVLMModel(CogVLMPreTrainedModel):
676
 
677
  hidden_states = self.norm(hidden_states)
678
 
 
 
 
 
679
  # add hidden states from the last decoder layer
680
  if output_hidden_states:
681
  all_hidden_states += (hidden_states,)
 
676
 
677
  hidden_states = self.norm(hidden_states)
678
 
679
+ if step == 1:
680
+ print("Shape of hidden states:", hidden_states.shape)
681
+ print("First values of hidden states:", hidden_states[0,:3,:3])
682
+
683
  # add hidden states from the last decoder layer
684
  if output_hidden_states:
685
  all_hidden_states += (hidden_states,)