docstr: Enhance function.
  
  Args:
      noisy_specturm (torch.Tensor): noisy feature in [Batch, T, F]
      sampler_type (str): sampler, 'pc' for Predictor-Corrector and 'ode' for ODE
                          sampler.
      predictor (str): the name of Predictor. 'reverse_diffusion',
                      'euler_maruyama', or 'none'
      corrector (str): the name of Corrector. 'langevin', 'ald' or 'none'
      N (int): The number of reverse sampling steps.
      corrector_steps (int) : number of steps in the Corrector.
      snr (float): The SNR to use for the corrector.
  Returns:
      X_Hat (torch.Tensor): enhanced feature in [Batch, T, F]
docstr_tok: ["Enhance","function",".","Args",":","noisy_specturm","(","torch.Tensor",")",":","noisy","feature","in","[","Batch",",","T",",","F","]","sampler_type","(","str",")",":","sampler",",","'pc","'","for","Predictor-Corrector","and","'ode","'","for","ODE","sampler",".","predictor","(","str",")",":","the","name","of","Predictor",".","'reverse_diffusion","'",",","'euler_maruyama","'",",","or","'none'","corrector","(","str",")",":","the","name","of","Corrector",".","'langevin","'",",","'ald","'","or","'none'","N","(","int",")",":","The","number","of","reverse","sampling","steps",".","corrector_steps","(","int",")",":","number","of","steps","in","the","Corrector",".","snr","(","float",")",":","The","SNR","to","use","for","the","corrector",".","Returns",":","X_Hat","(","torch.Tensor",")",":","enhanced","feature","in","[","Batch",",","T",",","F","]"]
code: def enhance(
      self,
      noisy_specturm,
      sampler_type="pc",
      predictor="reverse_diffusion",
      corrector="ald",
      N=30,
      corrector_steps=1,
      snr=0.5,
      **kwargs,
  ):
      """Enhance function.
  
      Args:
          noisy_specturm (torch.Tensor): noisy feature in [Batch, T, F]
          sampler_type (str): sampler, 'pc' for Predictor-Corrector and 'ode' for ODE
                              sampler.
          predictor (str): the name of Predictor. 'reverse_diffusion',
                          'euler_maruyama', or 'none'
          corrector (str): the name of Corrector. 'langevin', 'ald' or 'none'
          N (int): The number of reverse sampling steps.
          corrector_steps (int) : number of steps in the Corrector.
          snr (float): The SNR to use for the corrector.
      Returns:
          X_Hat (torch.Tensor): enhanced feature in [Batch, T, F]
      """
      Y = noisy_specturm.permute(0, 2, 1).unsqueeze(1)
      if sampler_type == "pc":
          sampler = self.get_pc_sampler(
              predictor,
              corrector,
              Y,
              N=N,
              corrector_steps=corrector_steps,
              snr=snr,
              intermediate=False,
              **kwargs,
          )
      elif sampler_type == "ode":
          sampler = self.get_ode_sampler(Y, N=N, **kwargs)
      else:
          print("{} is not a valid sampler type!".format(sampler_type))
  
      X_Hat, nfe = sampler()
  
      X_Hat = X_Hat.squeeze(1).permute(0, 2, 1)
  
      return X_Hat
  
file_path: espnet/espnet2/enh/diffusion/score_based_diffusion.py
imports: import math
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from typing import Dict, Optional, Tuple
  import torch
  import espnet2.enh.diffusion.sampling
  from espnet2.enh.diffusion.abs_diffusion import AbsDiffusion
  from espnet2.enh.diffusion.sdes import OUVESDE, OUVPSDE, SDE
  from espnet2.enh.layers.dcunet import DCUNet
  from espnet2.enh.layers.ncsnpp import NCSNpp
  from espnet2.train.class_choices import ClassChoices
label_desc: Use image node_id 7 for calling the ScoreModel obj's underlying member method code with example usage: obj.enhance(noisy_specturm, sampler_type, predictor, corrector, N, corrector_steps, snr) and returns: X_Hat