


memory = torch.rand(10, 32, 512)
      >>> tgt = torch.rand(20, 32, 512)
      >>> out = decoder_layer(tgt, memory)



Alternatively, when "batch_first" is "True":
      >>> decoder_layer = nn.TransformerDecoderLayer(d_model=512, nhead=8, batch_first=True)
      >>> memory = torch.rand(32, 10, 512)
      >>> tgt = torch.rand(32, 20, 512)
      >>> out = decoder_layer(tgt, memory)
forward(tgt, memory, tgt_mask=None, memory_mask=None, tgt_key_padding_mask=None, memory_key_padding_mask=None, tgt_is_causal=False, memory_is_causal=False)
  Pass the inputs (and mask) through the decoder layer.

  Parameters:
     * **tgt** (*Tensor*) -- the sequence to the decoder layer
       (required).

     * **memory** (*Tensor*) -- the sequence from the last layer
       of the encoder (required).

     * **tgt_mask** (*Optional**[**Tensor**]*) -- the mask for the
       tgt sequence (optional).

     * **memory_mask** (*Optional**[**Tensor**]*) -- the mask for
