src/transformers/models/oneformer/modeling_oneformer.py/OneFormerTransformerDecoderSelfAttentionLayer/forward_post
class OneFormerTransformerDecoderSelfAttentionLayer:    def forward_post(
        self,
        output,
        output_mask: Optional[Tensor] = None,
        output_key_padding_mask: Optional[Tensor] = None,
        query_pos: Optional[Tensor] = None,
    ):
        output2, attention_weights = self.self_attn(
            hidden_states=output, position_embeddings=query_pos, attention_mask=output_mask, output_attentions=True
        )
        output = output + self.dropout(output2)
        output = self.norm(output)

        return output, attention_weights