class_docstr: The Brain implementation for Tacotron2
class_docstr_tok: ["The","Brain","implementation","for","Tacotron2"]
docstr: Computes the forward pass
  
  Arguments
  ---------
  batch: str
      a single batch
  stage: speechbrain.Stage
      the training stage
  
  Returns
  -------
  the model output
docstr_tok: ["Computes","the","forward","pass","Arguments","--","--","--","--","-","batch",":","str","a","single","batch","stage",":","speechbrain.Stage","the","training","stage","Returns","--","--","--","-","the","model","output"]
code: def compute_forward(self, batch, stage):
      """Computes the forward pass
  
      Arguments
      ---------
      batch: str
          a single batch
      stage: speechbrain.Stage
          the training stage
  
      Returns
      -------
      the model output
      """
      effective_batch = self.batch_to_device(batch)
      inputs, y, num_items, _, _ = effective_batch
  
      _, input_lengths, _, _, _ = inputs
  
      max_input_length = input_lengths.max().item()
      return self.modules.model(inputs, alignments_dim=max_input_length)
  
file_path: speechbrain/recipes/LJSpeech/TTS/tacotron2/train.py
imports: import torch
  import speechbrain
  import sys
  import logging
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.text_to_sequence import text_to_sequence
  from speechbrain.utils.data_utils import scalarize
label_desc: Use image node_id 2 for calling the Tacotron2Brain obj's underlying member method code with example usage: obj.compute_forward(batch, stage) and returns: self