docstr: Filter-and-sum Network (FaSNet) Separator
  
  Args:
      input_dim: required by AbsSeparator. Not used in this model.
      enc_dim: encoder dimension
      feature_dim: feature dimension
      hidden_dim: hidden dimension in DPRNN
      layer: number of DPRNN blocks in iFaSNet
      segment_size: dual-path segment size
      num_spk: number of speakers
      win_len: window length in millisecond
      context_len: context length in millisecond
      fasnet_type: 'fasnet' or 'ifasnet'.
          Select from origin fasnet or Implicit fasnet
      dropout: dropout rate. Default is 0.
      sr: samplerate of input audio
      predict_noise: whether to output the estimated noise signal
code: def __init__(
      self,
      input_dim: int,
      enc_dim: int,
      feature_dim: int,
      hidden_dim: int,
      layer: int,
      segment_size: int,
      num_spk: int,
      win_len: int,
      context_len: int,
      fasnet_type: str,
      dropout: float = 0.0,
      sr: int = 16000,
      predict_noise: bool = False,
  ):
      """Filter-and-sum Network (FaSNet) Separator
  
      Args:
          input_dim: required by AbsSeparator. Not used in this model.
          enc_dim: encoder dimension
          feature_dim: feature dimension
          hidden_dim: hidden dimension in DPRNN
          layer: number of DPRNN blocks in iFaSNet
          segment_size: dual-path segment size
          num_spk: number of speakers
          win_len: window length in millisecond
          context_len: context length in millisecond
          fasnet_type: 'fasnet' or 'ifasnet'.
              Select from origin fasnet or Implicit fasnet
          dropout: dropout rate. Default is 0.
          sr: samplerate of input audio
          predict_noise: whether to output the estimated noise signal
      """
      super().__init__()
  
      self._num_spk = num_spk
      self.predict_noise = predict_noise
  
      assert fasnet_type in [
          "fasnet",
          "ifasnet",
      ], "only support fasnet and ifasnet"
  
      FASNET = FaSNet_TAC if fasnet_type == "fasnet" else iFaSNet
  
      self.fasnet = FASNET(
          enc_dim=enc_dim,
          feature_dim=feature_dim,
          hidden_dim=hidden_dim,
          layer=layer,
          segment_size=segment_size,
          nspk=num_spk + 1 if predict_noise else num_spk,
          win_len=win_len,
          context_len=context_len,
          sr=sr,
          dropout=dropout,
      )
  
file_path: espnet/espnet2/enh/separator/fasnet_separator.py
imports: from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple
  import torch
  from packaging.version import parse
  from espnet2.enh.layers.fasnet import FaSNet_TAC
  from espnet2.enh.layers.ifasnet import iFaSNet
  from espnet2.enh.separator.abs_separator import AbsSeparator
label_desc: Use image node_id 1 to create a new FaSNetSeparator object from inherited base classes: AbsSeparator with example: obj = FaSNetSeparator(input_dim, enc_dim, feature_dim, hidden_dim, layer, segment_size, num_spk, win_len, context_len, fasnet_type, dropout, sr, predict_noise)