class_docstr: An architecture combining hybrid Transformer/RNN with character-based
  inputs (token embeddings created via character-input CNN) and outputs.
  This model is very similar to https://arxiv.org/pdf/1809.02223.pdf.
class_docstr_tok: ["An","architecture","combining","hybrid","Transformer\/RNN","with","character-based","inputs","(","token","embeddings","created","via","character-input","CNN",")","and","outputs",".","This","model","is","very","similar","to","https",":","\/\/arxiv.org\/pdf\/1809.02223.pdf","."]
code: def build_decoder(cls, args, src_dict, dst_dict):
      # If we embed bytes then the number of indices is fixed and does not
      # depend on the dictionary
      if args.embed_bytes:
          num_chars = (
              vocab_constants.NUM_BYTE_INDICES + TAGS.__len__() + 1
          )
      else:
          num_chars = args.char_target_dict_size
  
      decoder_embed_tokens = (
          pytorch_translate_transformer.build_embedding(
              dictionary=dst_dict,
              embed_dim=args.decoder_embed_dim,
              path=args.decoder_pretrained_embed,
              freeze=args.decoder_freeze_embed,
          )
      )
      return CharAwareHybridRNNDecoder(
          args,
          src_dict=src_dict,
          dst_dict=dst_dict,
          embed_tokens=decoder_embed_tokens,
          num_chars=num_chars,
          char_embed_dim=args.char_embed_dim,
          char_cnn_params=args.char_cnn_params,
          char_cnn_nonlinear_fn=args.char_cnn_nonlinear_fn,
          char_cnn_num_highway_layers=args.char_cnn_num_highway_layers,
          use_pretrained_weights=False,
          finetune_pretrained_weights=False,
      )
  
imports: import math
  from ast import literal_eval
  from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq.models import register_model, register_model_architecture
  from pytorch_translate import char_encoder, char_source_hybrid, char_source_model, hybrid_transformer_rnn, transformer, vocab_constants
  from pytorch_translate.data.dictionary import TAGS
  from pytorch_translate.utils import maybe_cuda
label_desc: Use image node_id 4 for calling the CharAwareHybridModel obj's underlying member method code with example usage: obj.build_decoder(cls, args, src_dict, dst_dict) and returns: CharAwareHybridRNNDecoder