class_docstr: E2E module.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
class_docstr_tok: ["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 MT task.
  
  :param torch.Tensor xs_pad: batch of padded source sequences (B, Tmax, idim)
  :param torch.Tensor ys_pad: batch of padded target sequences (B, Lmax)
  :return: MT loss value
  :rtype: torch.Tensor
  :return: accuracy in MT decoder
  :rtype: float
code: def forward_mt(self, xs_pad, ys_pad):
      """Forward pass in the auxiliary MT task.
  
      :param torch.Tensor xs_pad: batch of padded source sequences (B, Tmax, idim)
      :param torch.Tensor ys_pad: batch of padded target sequences (B, Lmax)
      :return: MT loss value
      :rtype: torch.Tensor
      :return: accuracy in MT decoder
      :rtype: float
      """
      loss = 0.0
      acc = 0.0
      if self.mt_weight == 0:
          return loss, acc
  
      ilens = torch.sum(xs_pad != -1, dim=1).cpu().numpy()
      # NOTE: xs_pad is padded with -1
      ys_src = [y[y != -1] for y in xs_pad]  # parse padded ys_src
      xs_zero_pad = pad_list(ys_src, self.pad)  # re-pad with zero
      hs_pad, hlens, _ = self.enc_mt(
          self.dropout_mt(self.embed_mt(xs_zero_pad)), ilens
      )
      loss, acc, _ = self.dec(hs_pad, hlens, ys_pad)
      return loss, acc
  
imports: import argparse
  import copy
  import logging
  import math
  import os
  from itertools import groupby
  import chainer
  import nltk
  import numpy
  import torch
  from chainer import reporter
  from espnet.nets.e2e_asr_common import label_smoothing_dist
  from espnet.nets.pytorch_backend.ctc import CTC
  from espnet.nets.pytorch_backend.initialization import lecun_normal_init_parameters, set_forget_bias_to_one
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, pad_list, to_device, to_torch_tensor
  from espnet.nets.pytorch_backend.rnn.argument import add_arguments_rnn_attention_common, add_arguments_rnn_decoder_common, add_arguments_rnn_encoder_common
  from espnet.nets.pytorch_backend.rnn.attentions import att_for
  from espnet.nets.pytorch_backend.rnn.decoders import decoder_for
  from espnet.nets.pytorch_backend.rnn.encoders import encoder_for
  from espnet.nets.st_interface import STInterface
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 10 for calling the E2E obj's underlying member method code with example usage: obj.forward_mt(xs_pad, ys_pad) and returns: loss,  acc, loss,  acc