class_docstr: Encoder module for the case of multi-speaker mixture speech.
  
  :param str etype: type of encoder network
  :param int idim: number of dimensions of encoder network
  :param int elayers_sd:
      number of layers of speaker differentiate part in encoder network
  :param int elayers_rec:
      number of layers of shared recognition part in encoder network
  :param int eunits: number of lstm units of encoder network
  :param int eprojs: number of projection units of encoder network
  :param np.ndarray subsample: list of subsampling numbers
  :param float dropout: dropout rate
  :param int in_channel: number of input channels
  :param int num_spkrs: number of number of speakers
class_docstr_tok: ["Encoder","module","for","the","case","of","multi-speaker","mixture","speech",".",":","param","str","etype",":","type","of","encoder","network",":","param","int","idim",":","number","of","dimensions","of","encoder","network",":","param","int","elayers_sd",":","number","of","layers","of","speaker","differentiate","part","in","encoder","network",":","param","int","elayers_rec",":","number","of","layers","of","shared","recognition","part","in","encoder","network",":","param","int","eunits",":","number","of","lstm","units","of","encoder","network",":","param","int","eprojs",":","number","of","projection","units","of","encoder","network",":","param","np.ndarray","subsample",":","list","of","subsampling","numbers",":","param","float","dropout",":","dropout","rate",":","param","int","in_channel",":","number","of","input","channels",":","param","int","num_spkrs",":","number","of","number","of","speakers"]
docstr: Initialize the encoder of single-channel multi-speaker ASR.
docstr_tok: ["Initialize","the","encoder","of","single-channel","multi-speaker","ASR","."]
code: def __init__(
      self,
      etype,
      idim,
      elayers_sd,
      elayers_rec,
      eunits,
      eprojs,
      subsample,
      dropout,
      num_spkrs=2,
      in_channel=1,
  ):
      """Initialize the encoder of single-channel multi-speaker ASR."""
      super(EncoderMix, self).__init__()
      typ = etype.lstrip("vgg").rstrip("p")
      if typ not in ["lstm", "gru", "blstm", "bgru"]:
          logging.error(
              "Error: need to specify an appropriate encoder architecture"
          )
      if etype.startswith("vgg"):
          if etype[-1] == "p":
              self.enc_mix = torch.nn.ModuleList([VGG2L(in_channel)])
              self.enc_sd = torch.nn.ModuleList(
                  [
                      torch.nn.ModuleList(
                          [
                              RNNP(
                                  get_vgg2l_odim(
                                      idim, in_channel=in_channel
                                  ),
                                  elayers_sd,
                                  eunits,
                                  eprojs,
                                  subsample[: elayers_sd + 1],
                                  dropout,
                                  typ=typ,
                              )
                          ]
                      )
                      for i in range(num_spkrs)
                  ]
              )
              self.enc_rec = torch.nn.ModuleList(
                  [
                      RNNP(
                          eprojs,
                          elayers_rec,
                          eunits,
                          eprojs,
                          subsample[elayers_sd:],
                          dropout,
                          typ=typ,
                      )
                  ]
              )
              logging.info(
                  "Use CNN-VGG + B" + typ.upper() + "P for encoder"
              )
          else:
              logging.error(
                  f"Error: need to specify an appropriate encoder architecture. "
                  f"Illegal name {etype}"
              )
              sys.exit()
      else:
          logging.error(
              f"Error: need to specify an appropriate encoder architecture. "
              f"Illegal name {etype}"
          )
          sys.exit()
  
      self.num_spkrs = num_spkrs
  
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 1 to create a new EncoderMix object from inherited base classes: torch.nn with example: obj = EncoderMix(etype, idim, elayers_sd, elayers_rec, eunits, eprojs, subsample, dropout, num_spkrs, in_channel)