embedding dimension "embed_dim".
     * **attn_output_weights** - Only returned when
       "need_weights=True". If "average_attn_weights=True",
       returns attention weights averaged across heads of shape
       (L, S) when input is unbatched or (N, L, S), where N is the
       batch size, L is the target sequence length, and S is the
       source sequence length. If "average_attn_weights=False",
       returns attention weights per head of shape
       (\text{num\_heads}, L, S) when input is unbatched or (N,
       \text{num\_heads}, L, S).

     Note:

       *batch_first* argument is ignored for unbatched inputs.

merge_masks(attn_mask, key_padding_mask, query)
  Determine mask type and combine masks if necessary. If only one
  mask is provided, that mask and the corresponding mask type will
  be returned. If both masks are provided, they will be both
  expanded to shape "(batch_size, num_heads, seq_len, seq_len)",
