Unverified Commit aecbcb36 authored by zhbh01's avatar zhbh01 Committed by GitHub
Browse files

[BLIP] fix cross attentions for BlipTextEncoder (#22515)

parent 4e441e52
......@@ -445,6 +445,7 @@ class BlipTextEncoder(nn.Module):
next_decoder_cache += (layer_outputs[-1],)
if output_attentions:
all_self_attentions = all_self_attentions + (layer_outputs[1],)
all_cross_attentions = all_cross_attentions + (layer_outputs[2],)
if output_hidden_states:
all_hidden_states = all_hidden_states + (hidden_states,)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment