nielsr HF staff commited on
Commit
8f61efb
1 Parent(s): 248e815

Add print statements

Browse files
Files changed (1) hide show
  1. modeling_cogvlm.py +4 -0
modeling_cogvlm.py CHANGED
@@ -296,6 +296,10 @@ class VisionExpertAttention(nn.Module):
296
  print("First values of value_states:", value_states[0,0,-3:,-3:])
297
  print("Mean of value_states:", value_states.mean())
298
 
 
 
 
 
299
  context_layer = attention_fn(
300
  query_layer=query_states, key_layer=key_states, value_layer=value_states, attention_mask=attention_mask,
301
  scaling_attention_score=True, attention_dropout=None)
 
296
  print("First values of value_states:", value_states[0,0,-3:,-3:])
297
  print("Mean of value_states:", value_states.mean())
298
 
299
+ print("Shape of the attention_mask:", attention_mask.shape)
300
+ print("Mean of the attention_mask:", attention_mask.float().mean())
301
+ print("Is_full:", (attention_mask > 0).all())
302
+
303
  context_layer = attention_fn(
304
  query_layer=query_states, key_layer=key_states, value_layer=value_states, attention_mask=attention_mask,
305
  scaling_attention_score=True, attention_dropout=None)