nielsr HF staff commited on
Commit
173e467
1 Parent(s): 97c8408

Add print statements

Browse files
Files changed (1) hide show
  1. modeling_cogvlm.py +4 -0
modeling_cogvlm.py CHANGED
@@ -241,6 +241,10 @@ class VisionExpertAttention(nn.Module):
241
  key_states = self._transpose_for_scores(key_states) # B, H, L, HD
242
  value_states = self._transpose_for_scores(value_states) # B, H, L, HD
243
 
 
 
 
 
244
  # if print_values:
245
 
246
  # torch.save(query_states, "query_states.pt")
 
241
  key_states = self._transpose_for_scores(key_states) # B, H, L, HD
242
  value_states = self._transpose_for_scores(value_states) # B, H, L, HD
243
 
244
+ if print_values:
245
+ print("Shape of query_states:", query_states.shape)
246
+ print("First values of query_states:", query_states[0,0,:3,:3])
247
+
248
  # if print_values:
249
 
250
  # torch.save(query_states, "query_states.pt")