class_docstr: E2E module.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
docstr: Forward pass in the auxiliary ASR task.
  
  :param torch.Tensor hs_pad: batch of padded source sequences (B, Tmax, idim)
  :param torch.Tensor hs_mask: batch of input token mask (B, Lmax)
  :param torch.Tensor ys_pad: batch of padded target sequences (B, Lmax)
  :return: ASR attention loss value
  :rtype: torch.Tensor
  :return: accuracy in ASR attention decoder
  :rtype: float
  :return: ASR CTC loss value
  :rtype: torch.Tensor
  :return: character error rate from CTC prediction
  :rtype: float
  :return: character error rate from attetion decoder prediction
  :rtype: float
  :return: word error rate from attetion decoder prediction
  :rtype: float
code: def forward_asr(self, hs_pad, hs_mask, ys_pad):
      """Forward pass in the auxiliary ASR task.
  
      :param torch.Tensor hs_pad: batch of padded source sequences (B, Tmax, idim)
      :param torch.Tensor hs_mask: batch of input token mask (B, Lmax)
      :param torch.Tensor ys_pad: batch of padded target sequences (B, Lmax)
      :return: ASR attention loss value
      :rtype: torch.Tensor
      :return: accuracy in ASR attention decoder
      :rtype: float
      :return: ASR CTC loss value
      :rtype: torch.Tensor
      :return: character error rate from CTC prediction
      :rtype: float
      :return: character error rate from attetion decoder prediction
      :rtype: float
      :return: word error rate from attetion decoder prediction
      :rtype: float
      """
      loss_att, loss_ctc = 0.0, 0.0
      acc = None
      cer, wer = None, None
      cer_ctc = None
      if self.asr_weight == 0:
          return loss_att, acc, loss_ctc, cer_ctc, cer, wer
  
      # attention
      if self.mtlalpha < 1:
          ys_in_pad_asr, ys_out_pad_asr = add_sos_eos(
              ys_pad, self.sos, self.eos, self.ignore_id
          )
          ys_mask_asr = target_mask(ys_in_pad_asr, self.ignore_id)
          pred_pad, _ = self.decoder_asr(
              ys_in_pad_asr, ys_mask_asr, hs_pad, hs_mask
          )
          loss_att = self.criterion(pred_pad, ys_out_pad_asr)
  
          acc = th_accuracy(
              pred_pad.view(-1, self.odim),
              ys_out_pad_asr,
              ignore_label=self.ignore_id,
          )
          if not self.training:
              ys_hat_asr = pred_pad.argmax(dim=-1)
              cer, wer = self.error_calculator_asr(
                  ys_hat_asr.cpu(), ys_pad.cpu()
              )
  
      # CTC
      if self.mtlalpha > 0:
          batch_size = hs_pad.size(0)
          hs_len = hs_mask.view(batch_size, -1).sum(1)
          loss_ctc = self.ctc(
              hs_pad.view(batch_size, -1, self.adim), hs_len, ys_pad
          )
          if not self.training:
              ys_hat_ctc = self.ctc.argmax(
                  hs_pad.view(batch_size, -1, self.adim)
              ).data
              cer_ctc = self.error_calculator_asr(
                  ys_hat_ctc.cpu(), ys_pad.cpu(), is_ctc=True
              )
              # for visualization
              self.ctc.softmax(hs_pad)
      return loss_att, acc, loss_ctc, cer_ctc, cer, wer
  
imports: import logging
  import math
  from argparse import Namespace
  import numpy
  import torch
  from espnet.nets.e2e_asr_common import ErrorCalculator
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.e2e_mt_common import ErrorCalculator
  from espnet.nets.pytorch_backend.ctc import CTC
  from espnet.nets.pytorch_backend.e2e_asr import CTC_LOSS_THRESHOLD
  from espnet.nets.pytorch_backend.e2e_st import Reporter
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, make_non_pad_mask, pad_list, th_accuracy
  from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos
  from espnet.nets.pytorch_backend.transformer.argument import add_arguments_transformer_common
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.decoder import Decoder
  from espnet.nets.pytorch_backend.transformer.encoder import Encoder
  from espnet.nets.pytorch_backend.transformer.initializer import initialize
  from espnet.nets.pytorch_backend.transformer.label_smoothing_loss import LabelSmoothingLoss
  from espnet.nets.pytorch_backend.transformer.mask import subsequent_mask, target_mask
  from espnet.nets.pytorch_backend.transformer.plot import PlotAttentionReport
  from espnet.nets.st_interface import STInterface
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 7 for calling the E2E obj's underlying member method code with example usage: obj.forward_asr(hs_pad, hs_mask, ys_pad) and returns: loss_att,  acc,  loss_ctc,  cer_ctc,  cer,  wer, loss_att,  acc,  loss_ctc,  cer_ctc,  cer,  wer