class_docstr: E2E module.
  
  :param List idims: List of dimensions of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
docstr: Initialize weight like chainer.
  
  chainer basically uses LeCun way: W ~ Normal(0, fan_in ** -0.5), b = 0
  pytorch basically uses W, b ~ Uniform(-fan_in**-0.5, fan_in**-0.5)
  
  however, there are two exceptions as far as I know.
  - EmbedID.W ~ Normal(0, 1)
  - LSTM.upward.b[forget_gate_range] = 1 (but not used in NStepLSTM)
code: def init_like_chainer(self):
      """Initialize weight like chainer.
  
      chainer basically uses LeCun way: W ~ Normal(0, fan_in ** -0.5), b = 0
      pytorch basically uses W, b ~ Uniform(-fan_in**-0.5, fan_in**-0.5)
  
      however, there are two exceptions as far as I know.
      - EmbedID.W ~ Normal(0, 1)
      - LSTM.upward.b[forget_gate_range] = 1 (but not used in NStepLSTM)
      """
  
      def lecun_normal_init_parameters(module):
          for p in module.parameters():
              data = p.data
              if data.dim() == 1:
                  # bias
                  data.zero_()
              elif data.dim() == 2:
                  # linear weight
                  n = data.size(1)
                  stdv = 1.0 / math.sqrt(n)
                  data.normal_(0, stdv)
              elif data.dim() in (3, 4):
                  # conv weight
                  n = data.size(1)
                  for k in data.size()[2:]:
                      n *= k
                  stdv = 1.0 / math.sqrt(n)
                  data.normal_(0, stdv)
              else:
                  raise NotImplementedError
  
      def set_forget_bias_to_one(bias):
          n = bias.size(0)
          start, end = n // 4, n // 2
          bias.data[start:end].fill_(1.0)
  
      lecun_normal_init_parameters(self)
      # exceptions
      # embed weight ~ Normal(0, 1)
      self.dec.embed.weight.data.normal_(0, 1)
      # forget-bias = 1.0
      # https://discuss.pytorch.org/t/set-forget-gate-bias-of-lstm/1745
      for i in range(len(self.dec.decoder)):
          set_forget_bias_to_one(self.dec.decoder[i].bias_ih)
  
imports: import argparse
  import logging
  import math
  import os
  from itertools import groupby
  import chainer
  import numpy
  import torch
  from chainer import reporter
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.e2e_asr_common import label_smoothing_dist
  from espnet.nets.pytorch_backend.ctc import ctc_for
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, 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 Encoder, encoder_for
  from espnet.nets.scorers.ctc import CTCPrefixScorer
  from espnet.utils.cli_utils import strtobool
label_desc: Use image node_id 8 for calling the E2E obj's underlying member method code with example usage: obj.init_like_chainer() without return types