class_docstr: Implementation for https://arxiv.org/abs/2006.04558
class_docstr_tok: ["Implementation","for","https",":","\/\/arxiv.org\/abs\/2006.04558"]
code: def __init__(self, encoder, args, src_dict):
      super().__init__(encoder)
      self._num_updates = 0
  
      out_dim = args.output_frame_dim * args.n_frames_per_step
      self.ctc_proj = None
      if getattr(args, "ctc_weight", 0.0) > 0.0:
          self.ctc_proj = nn.Linear(out_dim, len(src_dict))
  
imports: import logging
  import torch
  from torch import nn
  from fairseq import utils
  from fairseq.data.data_utils import lengths_to_padding_mask
  from fairseq.models import FairseqEncoder, FairseqEncoderModel, register_model, register_model_architecture
  from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
  from fairseq.models.text_to_speech.tacotron2 import Postnet
  from fairseq.modules import FairseqDropout, LayerNorm, MultiheadAttention, PositionalEmbedding
label_desc: Use image node_id 4 to create a new FastSpeech2Model object from inherited base classes: FairseqEncoderModel with example: obj = FastSpeech2Model(encoder, args, src_dict)