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: E2E beam search.
  
  :param ndarray x: input acoustic feature (T, D)
  :param Namespace recog_args: argument Namespace containing options
  :param list char_list: list of characters
  :param torch.nn.Module rnnlm: language model module
  :return: N-best decoding results
  :rtype: list
docstr_tok: ["E2E","beam","search",".",":","param","ndarray","x",":","input","acoustic","feature","(","T",",","D",")",":","param","Namespace","recog_args",":","argument","Namespace","containing","options",":","param","list","char_list",":","list","of","characters",":","param","torch.nn.Module","rnnlm",":","language","model","module",":","return",":","N-best","decoding","results",":","rtype",":","list"]
code: def recognize(self, x, recog_args, char_list, rnnlm=None):
      """E2E beam search.
  
      :param ndarray x: input acoustic feature (T, D)
      :param Namespace recog_args: argument Namespace containing options
      :param list char_list: list of characters
      :param torch.nn.Module rnnlm: language model module
      :return: N-best decoding results
      :rtype: list
      """
      prev = self.training
      self.eval()
      ilens = [x.shape[0]]
  
      # subsample frame
      x = x[:: self.subsample[0], :]
      h = to_device(self, to_torch_tensor(x).float())
      # make a utt list (1) to use the same interface for encoder
      hs = h.contiguous().unsqueeze(0)
  
      # 0. Frontend
      if self.frontend is not None:
          hs, hlens, mask = self.frontend(hs, ilens)
          hlens_n = [None] * self.num_spkrs
          for i in range(self.num_spkrs):
              hs[i], hlens_n[i] = self.feature_transform(hs[i], hlens)
          hlens = hlens_n
      else:
          hs, hlens = hs, ilens
  
      # 1. Encoder
      if not isinstance(
          hs, list
      ):  # single-channel multi-speaker input x
          hs, hlens, _ = self.enc(hs, hlens)
      else:  # multi-channel multi-speaker input x
          for i in range(self.num_spkrs):
              hs[i], hlens[i], _ = self.enc(hs[i], hlens[i])
  
      # calculate log P(z_t|X) for CTC scores
      if recog_args.ctc_weight > 0.0:
          lpz = [self.ctc.log_softmax(i)[0] for i in hs]
      else:
          lpz = None
  
      # 2. decoder
      # decode the first utterance
      y = [
          self.dec.recognize_beam(
              hs[i][0], lpz[i], recog_args, char_list, rnnlm, strm_idx=i
          )
          for i in range(self.num_spkrs)
      ]
  
      if prev:
          self.train()
      return y
  
imports: import argparse
  import logging
  import math
  import os
  import sys
  from itertools import groupby
  import numpy
  import torch
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.e2e_asr_common import get_vgg2l_odim, label_smoothing_dist
  from espnet.nets.pytorch_backend.ctc import ctc_for
  from espnet.nets.pytorch_backend.e2e_asr import E2E
  from espnet.nets.pytorch_backend.e2e_asr import Reporter
  from espnet.nets.pytorch_backend.frontends.feature_transform import feature_transform_for
  from espnet.nets.pytorch_backend.frontends.frontend import frontend_for
  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, make_pad_mask, pad_list, to_device, to_torch_tensor
  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 RNNP, VGG2L
  from espnet.nets.pytorch_backend.rnn.encoders import encoder_for
label_desc: Use image node_id 7 for calling the E2E obj's underlying member method code with example usage: obj.recognize(x, recog_args, char_list, rnnlm) and returns: y