docstr: Deep Clustering End-to-End Separator
  
  References:
      Single-Channel Multi-Speaker Separation using Deep Clustering;
      Yusuf Isik. et al., 2016;
      https://www.isca-speech.org/archive/interspeech_2016/isik16_interspeech.html
  
  Args:
      input_dim: input feature dimension
      rnn_type: string, select from 'blstm', 'lstm' etc.
      bidirectional: bool, whether the inter-chunk RNN layers are bidirectional.
      num_spk: number of speakers
      predict_noise: whether to output the estimated noise signal
      nonlinear: the nonlinear function for mask estimation,
                 select from 'relu', 'tanh', 'sigmoid'
      layer: int, number of stacked RNN layers. Default is 3.
      unit: int, dimension of the hidden state.
      emb_D: int, dimension of the feature vector for a tf-bin.
      dropout: float, dropout ratio. Default is 0.
      alpha: float, the clustering hardness parameter.
      max_iteration: int, the max iterations of soft kmeans.
      threshold: float, the threshold to end the soft k-means process.
code: def __init__(
      self,
      input_dim: int,
      rnn_type: str = "blstm",
      num_spk: int = 2,
      predict_noise: bool = False,
      nonlinear: str = "tanh",
      layer: int = 2,
      unit: int = 512,
      emb_D: int = 40,
      dropout: float = 0.0,
      alpha: float = 5.0,
      max_iteration: int = 500,
      threshold: float = 1.0e-05,
  ):
      """Deep Clustering End-to-End Separator
  
      References:
          Single-Channel Multi-Speaker Separation using Deep Clustering;
          Yusuf Isik. et al., 2016;
          https://www.isca-speech.org/archive/interspeech_2016/isik16_interspeech.html
  
      Args:
          input_dim: input feature dimension
          rnn_type: string, select from 'blstm', 'lstm' etc.
          bidirectional: bool, whether the inter-chunk RNN layers are bidirectional.
          num_spk: number of speakers
          predict_noise: whether to output the estimated noise signal
          nonlinear: the nonlinear function for mask estimation,
                     select from 'relu', 'tanh', 'sigmoid'
          layer: int, number of stacked RNN layers. Default is 3.
          unit: int, dimension of the hidden state.
          emb_D: int, dimension of the feature vector for a tf-bin.
          dropout: float, dropout ratio. Default is 0.
          alpha: float, the clustering hardness parameter.
          max_iteration: int, the max iterations of soft kmeans.
          threshold: float, the threshold to end the soft k-means process.
      """
      super().__init__()
  
      self._num_spk = num_spk
      self.predict_noise = predict_noise
  
      self.blstm = RNN(
          idim=input_dim,
          elayers=layer,
          cdim=unit,
          hdim=unit,
          dropout=dropout,
          typ=rnn_type,
      )
  
      self.linear = torch.nn.Linear(unit, input_dim * emb_D)
  
      if nonlinear not in ("sigmoid", "relu", "tanh"):
          raise ValueError(
              "Not supporting nonlinear={}".format(nonlinear)
          )
  
      self.nonlinear = {
          "sigmoid": torch.nn.Sigmoid(),
          "relu": torch.nn.ReLU(),
          "tanh": torch.nn.Tanh(),
      }[nonlinear]
  
      self.num_outputs = (
          self.num_spk + 1 if self.predict_noise else self.num_spk
      )
      self.enh_blstm = RNN(
          idim=input_dim * (self.num_outputs + 1),
          elayers=1,
          cdim=unit,
          hdim=unit,
          dropout=dropout,
          typ=rnn_type,
      )
  
      self.enh_linear = torch.nn.Linear(
          unit, input_dim * self.num_outputs
      )
  
      self.D = emb_D
      self.alpha = alpha
      self.max_iteration = max_iteration
      self.threshold = threshold
  
file_path: espnet/espnet2/enh/separator/dpcl_e2e_separator.py
imports: from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from torch_complex.tensor import ComplexTensor
  from espnet2.enh.layers.complex_utils import is_complex
  from espnet2.enh.separator.abs_separator import AbsSeparator
  from espnet.nets.pytorch_backend.rnn.encoders import RNN
label_desc: Use image node_id 1 to create a new DPCLE2ESeparator object from inherited base classes: AbsSeparator with example: obj = DPCLE2ESeparator(input_dim, rnn_type, num_spk, predict_noise, nonlinear, layer, unit, emb_D, dropout, alpha, max_iteration, threshold)