Initializer of Conv kernels for Short-term Fourier Transformation (STFT).
Source:R/initializers.R
initializer_stft.RdSince the formula involves complex numbers, this class compute either the real or the imaginary components of the final output.
Additionally, this initializer supports windowing functions across the time
dimension as commonly used in STFT. Windowing functions from the Python module
scipy.signal.windows are supported, including the common hann and
hamming windowing functions. This layer supports periodic windows and
scaling-based normalization.
This is primarily intended for use in the STFTSpectrogram layer.
Arguments
- side
String,
"real"or"imag"deciding if the kernel will compute the real side or the imaginary side of the output. Defaults to"real".- window
String for the name of the windowing function in the
scipy.signal.windowsmodule, or array_like for the window values, orNULLfor no windowing.- scaling
String,
"density"or"spectrum"for scaling of the window for normalization, either L2 or L1 normalization.NULLfor no scaling.- periodic
Boolean, if True, the window function will be treated as periodic. Defaults to
FALSE.
Value
An Initializer instance that can be passed to layer or variable
constructors, or called directly with a shape to return a Tensor.
Examples
# Standalone usage:
initializer <- initializer_stft("real", "hann", "density", FALSE)
values <- initializer(shape = c(128, 1, 513))See also
Other initializers: initializer_constant() initializer_glorot_normal() initializer_glorot_uniform() initializer_he_normal() initializer_he_uniform() initializer_identity() initializer_lecun_normal() initializer_lecun_uniform() initializer_ones() initializer_orthogonal() initializer_random_normal() initializer_random_uniform() initializer_truncated_normal() initializer_variance_scaling() initializer_zeros()
Other constant initializers: initializer_constant() initializer_identity() initializer_ones() initializer_zeros()