class_docstr: Decoder layer.
  
  Args:
      odim (int): The output dimension.
      n_layers (int): Number of ecoder layers.
      n_units (int): Number of attention units.
      d_units (int): Dimension of input vector of decoder.
      h (int): Number of attention heads.
      dropout (float): Dropout rate.
      initialW (Initializer): Initializer to initialize the weight.
      initial_bias (Initializer): Initializer to initialize the bias.
class_docstr_tok: ["Decoder","layer",".","Args",":","odim","(","int",")",":","The","output","dimension",".","n_layers","(","int",")",":","Number","of","ecoder","layers",".","n_units","(","int",")",":","Number","of","attention","units",".","d_units","(","int",")",":","Dimension","of","input","vector","of","decoder",".","h","(","int",")",":","Number","of","attention","heads",".","dropout","(","float",")",":","Dropout","rate",".","initialW","(","Initializer",")",":","Initializer","to","initialize","the","weight",".","initial_bias","(","Initializer",")",":","Initializer","to","initialize","the","bias","."]
docstr: Prepare the attention mask.
  
  Args:
      source_block (ndarray): Source block with dimensions: (B x S).
      target_block (ndarray): Target block with dimensions: (B x T).
  Returns:
      ndarray: Mask with dimensions (B, S, T).
docstr_tok: ["Prepare","the","attention","mask",".","Args",":","source_block","(","ndarray",")",":","Source","block","with","dimensions",":","(","B","x","S",")",".","target_block","(","ndarray",")",":","Target","block","with","dimensions",":","(","B","x","T",")",".","Returns",":","ndarray",":","Mask","with","dimensions","(","B",",","S",",","T",")","."]
code: def make_attention_mask(self, source_block, target_block):
      """Prepare the attention mask.
  
      Args:
          source_block (ndarray): Source block with dimensions: (B x S).
          target_block (ndarray): Target block with dimensions: (B x T).
      Returns:
          ndarray: Mask with dimensions (B, S, T).
  
      """
      mask = (target_block[:, None, :] >= 0) * (
          source_block[:, :, None] >= 0
      )
      # (batch, source_length, target_length)
      return mask
  
file_path: espnet/espnet/nets/chainer_backend/transformer/decoder.py
imports: import chainer
  import chainer.functions
  import chainer.links
  import numpy
  from espnet.nets.chainer_backend.transformer.decoder_layer import DecoderLayer
  from espnet.nets.chainer_backend.transformer.embedding import PositionalEncoding
  from espnet.nets.chainer_backend.transformer.layer_norm import LayerNorm
  from espnet.nets.chainer_backend.transformer.mask import make_history_mask
label_desc: Use image node_id 2 for calling the Decoder obj's underlying member method code with example usage: obj.make_attention_mask(source_block, target_block) and returns: mask