Since 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.
initializer_stft(
side = "real",
window = "hann",
scaling = "density",
periodic = FALSE
)An Initializer instance that can be passed to layer or variable
constructors, or called directly with a shape to return a Tensor.
String, "real" or "imag" deciding if the kernel will compute
the real side or the imaginary side of the output. Defaults to
"real".
String for the name of the windowing function in the
scipy.signal.windows module, or array_like for the window values,
or NULL for no windowing.
String, "density" or "spectrum" for scaling of the window
for normalization, either L2 or L1 normalization.
NULL for no scaling.
Boolean, if True, the window function will be treated as
periodic. Defaults to FALSE.
# Standalone usage:
initializer <- initializer_stft("real", "hann", "density", FALSE)
values <- initializer(shape = c(128, 1, 513))
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()