-
Notifications
You must be signed in to change notification settings - Fork 4
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
About the STFT Loss #4
Comments
Hi @sh-lee-prml, Thank you for your interest in this matter. In the context of a Rectified Flow formulation, adding the estimated vector field to X0 provides an estimation of X1. Therefore, it is indeed sensible to apply the STFT loss to this sum. Directly applying STFT loss to the vector field alone is not as sound, but given that |STFT(x)| is a fixed function, the STFT loss on vector field can be viewed as a way to match a transformed feature, I guess it does not necessarily degrade the results when weighted appropriately. To find a proper weight for the STFT loss, one effective approach is to examine the gradient norms produced by different loss terms. In my practice, I adjust the weight for the STFT loss so that the gradient norm of the STFT loss (g_stft) is approximately one-tenth that of the Rectified Flow loss (g_rf). The following code can be used to compute these gradient norms:
This ensures that the STFT loss contributes to the overall learning process without overwhelming the primary loss function. |
Thanks for the reply! Now, I've tried to use the STFT loss with the weight of 1, 0.1, 0.01. and thanks for sharing your experience. I will check the gradient norm following your suggestion! I could share my results after training the model with STFT loss. Thanks! |
Hi Thanks for nice work!
I have a question about the STFT Loss.
Previously, I have tried to directly adopt the STFT loss on the estimated vector field, and this decrease the performance.
However, I found you utilized the STFT on the (The estimated Vector Field + X0) so this part is very interesting to me.
The question is
Have you compared the STFT loss on the estimated vector filed directly?
If you did, please share your experience!
Thanks for nice work again!
The text was updated successfully, but these errors were encountered: