Skip to content
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

The grad of training loss with respect to z_{sem} is zero #63

Open
ZhangMingKun1 opened this issue Sep 10, 2023 · 2 comments
Open

The grad of training loss with respect to z_{sem} is zero #63

ZhangMingKun1 opened this issue Sep 10, 2023 · 2 comments

Comments

@ZhangMingKun1
Copy link

First, thanks for your excellent work!

I've reproduced the model training process outlined in your project. However, during my inspection of the GaussianDiffusionBeatGans.training_losses method (defined in diffusion/base.py), I noticed that the gradient of the loss function with respect to the z_{sem} variable (passed via model_kwargs['cond']) is consistently zero. This raised concern because a zero gradient implies that z_{sem} is not being utilized in the training loss computation, which would essentially prevent the semantic encoder from training.

Could this possibly be a mistake or a misunderstanding on my part? Is this the same in your training process? If not, do you have any valuable ideas of the possible mistake in my reproduction? I would greatly appreciate any insights or clarifications you might be able to provide.

@Kim-Sung-Hun
Copy link

I have the same problem. When using the render function with a trained model for inference, output remains same regardless of the input image, changing only due to xT.

@dsj320
Copy link

dsj320 commented Apr 11, 2024

I would like to understand how the author trained the encoder and updated the gradients. Could someone provide me with this information? I would be very grateful for their assistance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants