
    i                     f    d dl Zd Zd ej                  ej                        j
                  fdZy)    Nc                 F    ddt        j                  | |z    |z        z   z  S )zM
    Using this sigmoid to discourage one network overpowering the other
       )npexp)xshiftmults      \/var/www/html/dev/engine/venv/lib/python3.12/site-packages/noisereduce/spectralgate/utils.pysigmoidr      s(     BFFQY<$.//00    g      T@c                     dt        j                  t        j                  |       |z         z  }t        j                  |t        j                  |dd      |z
        S )zC
    Convert the input tensor from amplitude to decibel scale.
       T)axiskeepdims)r   log10absmaximummax)r   top_dbepsx_dbs       r
   
_amp_to_dbr      sF     S))D::dBFF4b4@6IJJr   )numpyr   r   finfofloat64r   r    r   r
   <module>r      s/    1 8288BJJ#7#;#; Kr   