class_docstr: Implementation for https://arxiv.org/pdf/1809.08895.pdf
class_docstr_tok: ["Implementation","for","https",":","\/\/arxiv.org\/pdf\/1809.08895.pdf"]
code: def from_pretrained(
      cls,
      model_name_or_path,
      checkpoint_file="model.pt",
      data_name_or_path=".",
      config_yaml="config.yaml",
      vocoder: str = "griffin_lim",
      fp16: bool = False,
      **kwargs,
  ):
      from fairseq import hub_utils
  
      x = hub_utils.from_pretrained(
          model_name_or_path,
          checkpoint_file,
          data_name_or_path,
          archive_map=cls.hub_models(),
          config_yaml=config_yaml,
          vocoder=vocoder,
          fp16=fp16,
          **kwargs,
      )
      return TTSHubInterface(x["args"], x["task"], x["models"][0])
  
imports: import logging
  from typing import List, Optional
  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, FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
  from fairseq.models.text_to_speech.tacotron2 import Postnet, Prenet
  from fairseq.modules import FairseqDropout, LayerNorm, PositionalEmbedding, TransformerDecoderLayer, TransformerEncoderLayer
label_desc: Use image node_id 2 for calling the TTSTransformerModel obj's underlying member method code with example usage: obj.from_pretrained(cls, model_name_or_path, checkpoint_file, data_name_or_path, config_yaml, vocoder, fp16) and returns: TTSHubInterface