class_docstr: A decoder that is similar to the HybridRNNDecoder but has a character
  CNN encoder to get the representation for each generated previous token.
  The decoder is similar to https://arxiv.org/pdf/1809.02223.pdf.
class_docstr_tok: ["A","decoder","that","is","similar","to","the","HybridRNNDecoder","but","has","a","character","CNN","encoder","to","get","the","representation","for","each","generated","previous","token",".","The","decoder","is","similar","to","https",":","\/\/arxiv.org\/pdf\/1809.02223.pdf","."]
docstr: The assumption is that during inference, the word embedding values are
  summed with their corresponding character representations. Thus the model
  will look like the same as a word-based decoder.
docstr_tok: ["The","assumption","is","that","during","inference",",","the","word","embedding","values","are","summed","with","their","corresponding","character","representations",".","Thus","the","model","will","look","like","the","same","as","a","word-based","decoder","."]
code: def forward(
      self,
      prev_output_tokens,
      encoder_out,
      incremental_state=None,
      possible_translation_tokens=None,
      timestep=None,
      prev_output_chars=None,
  ):
      """
      The assumption is that during inference, the word embedding values are
      summed with their corresponding character representations. Thus the model
      will look like the same as a word-based decoder.
      """
      if self.training:
          x, prev_output_tokens = self._embed_prev_outputs(
              prev_output_tokens=prev_output_tokens,
              incremental_state=incremental_state,
              prev_output_chars=prev_output_chars,
          )
      else:
          x, prev_output_tokens = super()._embed_prev_outputs(
              prev_output_tokens=prev_output_tokens,
              incremental_state=incremental_state,
          )
      return self._forward_given_embeddings(
          embed_out=x,
          prev_output_tokens=prev_output_tokens,
          encoder_out=encoder_out,
          incremental_state=incremental_state,
          possible_translation_tokens=possible_translation_tokens,
          timestep=timestep,
      )
  
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 5 for calling the CharAwareHybridRNNDecoder obj's underlying member method code with example usage: obj.forward(prev_output_tokens, encoder_out, incremental_state, possible_translation_tokens, timestep, prev_output_chars) and returns: self