class_docstr: see recipes/timers-and-such/decoupled/train.py
      
docstr: Forward computations from the waveform batches to the output probabilities.
code: def compute_forward(self, batch, stage):
      """Forward computations from the waveform batches to the output probabilities."""
      batch = batch.to(self.device)
      if stage == sb.Stage.TRAIN or stage == sb.Stage.VALID:
          # true_transcripts, true_transcript_lens = batch.transcript
          true_transcripts = batch.transcript
      else:
          wavs, wav_lens = batch.sig
      tokens_bos, tokens_bos_lens = batch.tokens_bos
  
      # Forward pass
      if stage == sb.Stage.TRAIN or stage == sb.Stage.VALID:
          asr_tokens = [
              self.hparams.asr_model.tokenizer.encode_as_ids(t)
              for t in true_transcripts
          ]
      else:
          words, asr_tokens = self.hparams.asr_model.transcribe_batch(
              wavs.detach(), wav_lens
          )
  
      # Pad examples to have same length.
      asr_tokens_lens = torch.tensor(
          [max(len(t), 1) for t in asr_tokens]
      )
      max_length = asr_tokens_lens.max().item()
      for t in asr_tokens:
          t += [0] * (max_length - len(t))
      asr_tokens = torch.tensor([t for t in asr_tokens])
  
      asr_tokens_lens = asr_tokens_lens.float()
      asr_tokens_lens = asr_tokens_lens / asr_tokens_lens.max()
  
      asr_tokens, asr_tokens_lens = (
          asr_tokens.to(self.device),
          asr_tokens_lens.to(self.device),
      )
      embedded_transcripts = self.hparams.input_emb(asr_tokens)
  
      # SLU forward pass
      encoder_out = self.hparams.slu_enc(embedded_transcripts)
      e_in = self.hparams.output_emb(tokens_bos)
      h, _ = self.hparams.dec(e_in, encoder_out, asr_tokens_lens)
  
      # Output layer for seq2seq log-probabilities
      logits = self.hparams.seq_lin(h)
      p_seq = self.hparams.log_softmax(logits)
  
      # Compute outputs
      if (
          stage == sb.Stage.TRAIN
          and self.step % show_results_every != 0
      ):
          return p_seq, asr_tokens_lens
      else:
          p_tokens, scores = self.hparams.beam_searcher(
              encoder_out, asr_tokens_lens
          )
          return p_seq, asr_tokens_lens, p_tokens
  
file_path: speechbrain/tests/templates/fetching_ddp_dynbatch_finetuning/multisource_mini_recipe.py
imports: import sys
  import torch
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
label_desc: Use image node_id 1 for calling the SLU obj's underlying member method code with example usage: obj.compute_forward(batch, stage) and returns: p_seq,  asr_tokens_lens, p_seq,  asr_tokens_lens,  p_tokens