add chapter04#64
Open
todayka wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
再構成誤差 物理量 |
i14kwmr
reviewed
Jul 23, 2023
|
|
||
| X = stft(x, L, S, w) | ||
|
|
||
| # プロット |
Collaborator
There was a problem hiding this comment.
i14kwmr
reviewed
Jul 23, 2023
| return w_synth | ||
|
|
||
|
|
||
| # 確認 |
Collaborator
There was a problem hiding this comment.
コメント:
確認コードがあって良いと思います!
網羅的に確認するときは、ytakeuchiくんの確認コード(url)が参考になるかもです!
i14kwmr
reviewed
Jul 23, 2023
|
|
||
|
|
||
| # 合成窓 | ||
| def window_synth(w, L, S): |
Collaborator
There was a problem hiding this comment.
コメント:
細かいですが、演習問題としては、関数の入力は「シフト幅S」と「L点の窓関数」の2つを意図していました!その場合ですが、Lは関数内でlen(w)とかを用いて取得する感じになるかと!
i14kwmr
reviewed
Jul 25, 2023
|
|
||
| x_pad = zero_pad(x, L, S) | ||
|
|
||
| # 再構成誤差 |
Collaborator
There was a problem hiding this comment.
コメント:
再構成誤差の計算についてですが、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
となります
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.