class_docstr: Transformer decoder consisting of *args.decoder_layers* layers. Each layer
  is a :class:`TransformerDecoderLayer`.
  Args:
      args (argparse.Namespace): parsed command-line arguments
      dictionary (~fairseq.data.Dictionary): decoding dictionary
      embed_tokens (torch.nn.Embedding): output embedding
      no_encoder_attn (bool, optional): whether to attend to encoder outputs.
          Default: ``False``
      left_pad (bool, optional): whether the input is left-padded. Default:
          ``False``
class_docstr_tok: ["Transformer","decoder","consisting","of","*","args.decoder_layers","*","layers",".","Each","layer","is","a",":","class",":","`","TransformerDecoderLayer","`",".","Args",":","args","(","argparse.Namespace",")",":","parsed","command-line","arguments","dictionary","(","~fairseq.data.Dictionary",")",":","decoding","dictionary","embed_tokens","(","torch.nn.Embedding",")",":","output","embedding","no_encoder_attn","(","bool",",","optional",")",":","whether","to","attend","to","encoder","outputs",".","Default",":","``","False","``","left_pad","(","bool",",","optional",")",":","whether","the","input","is","left-padded",".","Default",":","``","False","``"]
code: def buffered_future_mask(self, tensor):
      dim = tensor.size(0)
      if (
          not hasattr(self, "_future_mask")
          or self._future_mask is None
          or self._future_mask.device != tensor.device
      ):
          self._future_mask = torch.triu(
              utils.fill_with_neg_inf(tensor.new(dim, dim)), 1
          )
      if self._future_mask.size(0) < dim:
          self._future_mask = torch.triu(
              utils.fill_with_neg_inf(
                  self._future_mask.resize_(dim, dim)
              ),
              1,
          )
      return self._future_mask[:dim, :dim]
  
imports: import argparse
  import math
  from collections.abc import Iterable
  import torch
  import torch.nn
  from examples.speech_recognition.data.data_utils import lengths_to_encoder_padding_mask
  from fairseq import utils
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqEncoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.modules import LinearizedConvolution, TransformerDecoderLayer, TransformerEncoderLayer, VGGBlock
label_desc: Use image node_id 3 for calling the TransformerDecoder obj's underlying member method code with example usage: obj.buffered_future_mask(tensor) and returns: self