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 _init_dims(self, args, src_dict, dst_dict, embed_tokens):
      self.dropout = args.dropout
  
      embed_dim = embed_tokens.embedding_dim
      self.embed_tokens = embed_tokens
  
      self.lstm_units = args.decoder_lstm_units
      self.num_layers = args.decoder_layers
      self.initial_input_dim = embed_dim
  
      self.encoder_output_dim = args.encoder_embed_dim
      if args.decoder_reduced_attention_dim is None:
          self.attention_dim = self.encoder_output_dim
      else:
          self.attention_dim = args.decoder_reduced_attention_dim
      self.input_dim = self.lstm_units + self.attention_dim
  
      self.num_attention_heads = args.decoder_attention_heads
      self.bottleneck_dim = args.decoder_out_embed_dim
  
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 1 for calling the HybridRNNDecoder obj's underlying member method code with example usage: obj._init_dims(args, src_dict, dst_dict, embed_tokens) without return types