torch.hamming_window
- torch.hamming_window(window_length, *, dtype=None, layout=None, device=None, pin_memory=False, requires_grad
Hamming window function.
where is the full window size.
The input window_length is a positive integer controlling the
returned window size. periodic flag determines whether the returned
window trims off the last duplicate value from the symmetric window and is
ready to be used as a periodic window with functions like
torch.stft(). Therefore, if periodic is true, the in
above formula is in fact . Also, we always have
torch.hamming_window(L, equal to
.
window_length (int) – the size of returned window
dtype (torch.dtype, optional) – the desired data type of returned tensor.
Default: if None, uses a global default (see torch.set_default_dtype()). Only floating point types are supported.
layout (, optional) – the desired layout of returned window tensor. Only
(dense layout) is supported.
Hamming window function with periodic specified.
dtype (torch.dtype, optional) – the desired data type of returned tensor.
Default: if None, uses a global default (see ). Only floating point types are supported.
Hamming window function with periodic and alpha specified.
Hamming window function with periodic, alpha and beta specified.
torch.hamming_window(L + 1, periodic=False)[:-1])torch.strideddevice (torch.device, optional) – the desired device of returned tensor.
Default: if None, uses the current device for the default tensor type
(see torch.set_default_device()). device will be the CPU
for CPU tensor types and the current CUDA device for CUDA tensor types.
pin_memory (bool, optional) – If set, returned tensor would be allocated in
the pinned memory. Works only for CPU tensors. Default: False.
requires_grad (bool, optional) – If autograd should record operations on the
returned tensor. Default: False.
A 1-D tensor of size containing the window.
layout (torch.layout, optional) – the desired layout of returned window tensor. Only
torch.strided (dense layout) is supported.
device (torch.device, optional) – the desired device of returned tensor.
Default: if None, uses the current device for the default tensor type
(see torch.set_default_device()). device will be the CPU
for CPU tensor types and the current CUDA device for CUDA tensor types.
pin_memory (bool, optional) – If set, returned tensor would be allocated in
the pinned memory. Works only for CPU tensors. Default: False.
requires_grad (bool, optional) – If autograd should record operations on the
returned tensor. Default: False.
A 1-D tensor of size containing the window.
torch.dtypeNonelayout (torch.layout, optional) – the desired layout of returned window tensor. Only
torch.strided (dense layout) is supported.
device (torch.device, optional) – the desired device of returned tensor.
Default: if None, uses the current device for the default tensor type
(see torch.set_default_device()). device will be the CPU
for CPU tensor types and the current CUDA device for CUDA tensor types.
pin_memory (bool, optional) – If set, returned tensor would be allocated in
the pinned memory. Works only for CPU tensors. Default: False.
requires_grad (bool, optional) – If autograd should record operations on the
returned tensor. Default: False.
A 1-D tensor of size containing the window.
dtype (torch.dtype, optional) – the desired data type of returned tensor.
Default: if None, uses a global default (see torch.set_default_dtype()). Only floating point types are supported.
layout (torch.layout, optional) – the desired layout of returned window tensor. Only
torch.strided (dense layout) is supported.
device (torch.device, optional) – the desired device of returned tensor.
Default: if None, uses the current device for the default tensor type
(see torch.set_default_device()). device will be the CPU
for CPU tensor types and the current CUDA device for CUDA tensor types.
pin_memory (bool, optional) – If set, returned tensor would be allocated in
the pinned memory. Works only for CPU tensors. Default: False.
requires_grad (bool, optional) – If autograd should record operations on the
returned tensor. Default: False.
A 1-D tensor of size containing the window.