(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
       the memory sequence (optional).

     * **tgt_key_padding_mask** (*Optional**[**Tensor**]*) -- the
       mask for the tgt keys per batch (optional).

     * **memory_key_padding_mask** (*Optional**[**Tensor**]*) --
       the mask for the memory keys per batch (optional).

  Return type:
     *Tensor*

  Shape:
     see the docs in Transformer class.
