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: Encode acoustic features.
  
  :param ndarray x: source acoustic feature (T, D)
  :return: encoder outputs
  :rtype: torch.Tensor
docstr_tok: ["Encode","acoustic","features",".",":","param","ndarray","x",":","source","acoustic","feature","(","T",",","D",")",":","return",":","encoder","outputs",":","rtype",":","torch.Tensor"]
code: def encode(self, x):
      """Encode acoustic features.
  
      :param ndarray x: source acoustic feature (T, D)
      :return: encoder outputs
      :rtype: torch.Tensor
      """
      self.eval()
      x = torch.as_tensor(x).unsqueeze(0)
      enc_output, _ = self.encoder(x, None)
      return enc_output
  
imports: import logging
  import math
  from argparse import Namespace
  import numpy
  import torch
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.ctc_prefix_score import CTCPrefixScore
  from espnet.nets.e2e_asr_common import end_detect
  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_asr_mix import E2E
  from espnet.nets.pytorch_backend.e2e_asr_mix import PIT
  from espnet.nets.pytorch_backend.e2e_asr_transformer import E2E
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, th_accuracy
  from espnet.nets.pytorch_backend.rnn.decoders import CTC_SCORING_RATIO
  from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos
  from espnet.nets.pytorch_backend.transformer.encoder_mix import EncoderMix
  from espnet.nets.pytorch_backend.transformer.mask import subsequent_mask, target_mask
label_desc: Use image node_id 5 for calling the E2E obj's underlying member method code with example usage: obj.encode(x) and returns: enc_output