code: def __init__(self, hparams):
      super(Tacotron2, self).__init__()
      self.mask_padding = hparams.mask_padding
      self.fp16_run = hparams.fp16_run
      self.n_mel_channels = hparams.n_mel_channels
      self.n_frames_per_step = hparams.n_frames_per_step
  
      # initialize text encoder embedding
      self.embedding = nn.Embedding(
          hparams.n_symbols, hparams.symbols_embedding_dim
      )
      std = sqrt(
          2.0 / (hparams.n_symbols + hparams.symbols_embedding_dim)
      )
      val = sqrt(3.0) * std  # uniform bounds for std
      self.embedding.weight.data.uniform_(-val, val)
  
      # initialize observed attribute embedding
      self.obs_embedding = None
      if hparams.obs_dim > 0:
          self.obs_embedding = nn.Embedding(
              hparams.obs_n_class, hparams.obs_dim
          )
          std = sqrt(2.0 / (hparams.obs_n_class + hparams.obs_dim))
          val = sqrt(3.0) * std  # uniform bounds for std
          self.obs_embedding.weight.data.uniform_(-val, val)
  
      self.encoder = Encoder(hparams)
      self.decoder = Decoder(hparams)
      self.postnet = Postnet(hparams)
  
      self.lat_encoder = None
      if hparams.lat_dim > 0:
          self.lat_encoder = AudioEncoder(hparams)
  
imports: from math import sqrt
  import torch
  import torch.distributions
  from torch.autograd import Variable
  from torch import nn
  from torch.nn import functional
  from .layers import ConvNorm, LinearNorm, GlobalAvgPool
  from .utils import to_gpu, get_mask_from_lengths
label_desc: Use image node_id 1 to create a new Tacotron2 object from inherited base classes: nn with example: obj = Tacotron2(hparams)