-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add chapter04 #64
base: main
Are you sure you want to change the base?
add chapter04 #64
Conversation
再構成誤差 物理量 |
|
||
X = stft(x, L, S, w) | ||
|
||
# プロット |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return w_synth | ||
|
||
|
||
# 確認 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント:
確認コードがあって良いと思います!
網羅的に確認するときは、ytakeuchiくんの確認コード(url)が参考になるかもです!
|
||
|
||
# 合成窓 | ||
def window_synth(w, L, S): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント:
細かいですが、演習問題としては、関数の入力は「シフト幅S」と「L点の窓関数」の2つを意図していました!その場合ですが、L
は関数内でlen(w)
とかを用いて取得する感じになるかと!
|
||
x_pad = zero_pad(x, L, S) | ||
|
||
# 再構成誤差 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント:
再構成誤差の計算についてですが、np.sum(x_pad - x_istft) ** 2
ではなく、np.sum((x_pad - x_istft) ** 2)
にする必要があるかと!x_pad - x_istftだと、誤差が大きかった場合でも正負の関係で打ち消しが起こってしまって誤差が小さく出てしまうことがあります
例えば、信号の誤差が[-10, 10, -10, 10]の場合、
np.sum(x_pad - x_istft) ** 2
=0np.sum((x_pad - x_istft) ** 2)
=400
となります
No description provided.