PyTorch torch.bartlett_window 関数
torch.bartlett_windowは、PyTorch で Bartlett ウィンドウを生成するための関数です。Bartlett ウィンドウは三角窓関数の一種で、信号処理における窓関数としてよく使用され、スペクトル漏れを低減するために使われます。
関数定義
torch.bartlett_window(window_length, periodic=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
使用例
実例
import torch
# 長さ 512 の Bartlett ウィンドウを作成
window = torch.bartlett_window(512)
print("Bartlett ウィンドウ形状:", window.shape)
print("ウィンドウの最初の5個の値:", window[:5])
# 長さ 512 の Bartlett ウィンドウを作成
window = torch.bartlett_window(512)
print("Bartlett ウィンドウ形状:", window.shape)
print("ウィンドウの最初の5個の値:", window[:5])
その他の拡張
Pytorch torch リファレンスマニュアル