Unverified Commit a95cfa82 authored by Igor Sugak's avatar Igor Sugak Committed by GitHub
Browse files

[CODEMOD][pytorch] replace uses of np.ndarray with npt.NDArray (#3845)

Differential Revision: D64619891

Pull Request resolved: https://github.com/pytorch/audio/pull/3846
parent 79047bf6
import numpy as np import numpy as np
import numpy.typing as npt
def oscillator_bank( def oscillator_bank(
...@@ -43,8 +44,8 @@ def freq_ir(magnitudes): ...@@ -43,8 +44,8 @@ def freq_ir(magnitudes):
def exp_sigmoid( def exp_sigmoid(
input: np.ndarray, exponent: float = 10.0, max_value: float = 2.0, threshold: float = 1e-7 input: npt.NDArray, exponent: float = 10.0, max_value: float = 2.0, threshold: float = 1e-7
) -> np.ndarray: ) -> npt.NDArray:
"""Exponential Sigmoid pointwise nonlinearity (Numpy version). """Exponential Sigmoid pointwise nonlinearity (Numpy version).
Implements the equation: Implements the equation:
``max_value`` * sigmoid(``input``) ** (log(``exponent``)) + ``threshold`` ``max_value`` * sigmoid(``input``) ** (log(``exponent``)) + ``threshold``
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment