docstr: Abstract Tacotron class 
docstr_tok: ["Abstract","Tacotron","class"]
code: def __init__(
      self,
      num_chars,
      num_speakers,
      r,
      postnet_output_dim=80,
      decoder_output_dim=80,
      attn_type="original",
      attn_win=False,
      attn_norm="softmax",
      prenet_type="original",
      prenet_dropout=True,
      forward_attn=False,
      trans_agent=False,
      forward_attn_mask=False,
      location_attn=True,
      attn_K=5,
      separate_stopnet=True,
      bidirectional_decoder=False,
      double_decoder_consistency=False,
      ddc_r=None,
      encoder_in_features=512,
      decoder_in_features=512,
      speaker_embedding_dim=None,
      gst=False,
      gst_embedding_dim=512,
      gst_num_heads=4,
      gst_style_tokens=10,
      gst_use_speaker_embedding=False,
  ):
      """Abstract Tacotron class"""
      super().__init__()
      self.num_chars = num_chars
      self.r = r
      self.decoder_output_dim = decoder_output_dim
      self.postnet_output_dim = postnet_output_dim
      self.gst = gst
      self.gst_embedding_dim = gst_embedding_dim
      self.gst_num_heads = gst_num_heads
      self.gst_style_tokens = gst_style_tokens
      self.gst_use_speaker_embedding = gst_use_speaker_embedding
      self.num_speakers = num_speakers
      self.bidirectional_decoder = bidirectional_decoder
      self.double_decoder_consistency = double_decoder_consistency
      self.ddc_r = ddc_r
      self.attn_type = attn_type
      self.attn_win = attn_win
      self.attn_norm = attn_norm
      self.prenet_type = prenet_type
      self.prenet_dropout = prenet_dropout
      self.forward_attn = forward_attn
      self.trans_agent = trans_agent
      self.forward_attn_mask = forward_attn_mask
      self.location_attn = location_attn
      self.attn_K = attn_K
      self.separate_stopnet = separate_stopnet
      self.encoder_in_features = encoder_in_features
      self.decoder_in_features = decoder_in_features
      self.speaker_embedding_dim = speaker_embedding_dim
  
      # layers
      self.embedding = None
      self.encoder = None
      self.decoder = None
      self.postnet = None
  
      # multispeaker
      if self.speaker_embedding_dim is None:
          # if speaker_embedding_dim is None we need use the nn.Embedding, with default speaker_embedding_dim
          self.embeddings_per_sample = False
      else:
          # if speaker_embedding_dim is not None we need use speaker embedding per sample
          self.embeddings_per_sample = True
  
      # global style token
      if self.gst:
          self.decoder_in_features += (
              gst_embedding_dim  # add gst embedding dim
          )
          self.gst_layer = None
  
      # model states
      self.speaker_embeddings = None
      self.speaker_embeddings_projected = None
  
      # additional layers
      self.decoder_backward = None
      self.coarse_decoder = None
  
imports: import copy
  from abc import ABC, abstractmethod
  import torch
  from torch import nn
  from TTS.tts.utils.generic_utils import sequence_mask
label_desc: Use image node_id 1 to create a new TacotronAbstract object from inherited base classes: ABC, nn with example: obj = TacotronAbstract(num_chars, num_speakers, r, postnet_output_dim, decoder_output_dim, attn_type, attn_win, attn_norm, prenet_type, prenet_dropout, forward_attn, trans_agent, forward_attn_mask, location_attn, attn_K, separate_stopnet, bidirectional_decoder, double_decoder_consistency, ddc_r, encoder_in_features, decoder_in_features, speaker_embedding_dim, gst, gst_embedding_dim, gst_num_heads, gst_style_tokens, gst_use_speaker_embedding)