class_docstr: Decoder with general structure of Chen et al., The Best of Both Worlds:
  Combining Recent Advances in Neural Machine Translation, 2018.
  https://arxiv.org/abs/1804.09849
class_docstr_tok: ["Decoder","with","general","structure","of","Chen","et","al.",",","The","Best","of","Both","Worlds",":","Combining","Recent","Advances","in","Neural","Machine","Translation",",","2018.","https",":","\/\/arxiv.org\/abs\/1804.09849"]
code: def _embed_prev_outputs(
      self, prev_output_tokens, incremental_state=None
  ):
      if incremental_state is not None:
          prev_output_tokens = prev_output_tokens[:, -1:]
      x = self.embed_tokens(prev_output_tokens)
      x = F.dropout(x, p=self.dropout, training=self.training)
  
      # B x T x C -> T x B x C
      x = x.transpose(0, 1)
  
      return x, prev_output_tokens
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture, transformer
  from fairseq.modules import MultiheadAttention
  from pytorch_translate import multilingual_model, transformer, vocab_reduction
  from pytorch_translate.utils import torch_find
label_desc: Use image node_id 8 for calling the HybridRNNDecoder obj's underlying member method code with example usage: obj._embed_prev_outputs(prev_output_tokens, incremental_state) and returns: x,  prev_output_tokens