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 source text feature (B, T, D)
  :param Namespace trans_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","source","text","feature","(","B",",","T",",","D",")",":","param","Namespace","trans_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 translate(self, x, trans_args, char_list, rnnlm=None):
      """E2E beam search.
  
      :param ndarray x: input source text feature (B, T, D)
      :param Namespace trans_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()
  
      # 1. encoder
      # make a utt list (1) to use the same interface for encoder
      if self.multilingual:
          ilen = [len(x[0][1:])]
          h = to_device(
              self,
              torch.from_numpy(
                  np.fromiter(map(int, x[0][1:]), dtype=np.int64)
              ),
          )
      else:
          ilen = [len(x[0])]
          h = to_device(
              self,
              torch.from_numpy(
                  np.fromiter(map(int, x[0]), dtype=np.int64)
              ),
          )
      hs, _, _ = self.enc(
          self.dropout(self.embed(h.unsqueeze(0))), ilen
      )
  
      # 2. decoder
      # decode the first utterance
      y = self.dec.recognize_beam(
          hs[0], None, trans_args, char_list, rnnlm
      )
  
      if prev:
          self.train()
      return y
  
imports: import argparse
  import logging
  import math
  import os
  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.mt_interface import MTInterface
  from espnet.nets.pytorch_backend.initialization import uniform_init_parameters
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, pad_list, to_device
  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.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 9 for calling the E2E obj's underlying member method code with example usage: obj.translate(x, trans_args, char_list, rnnlm) and returns: y