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

Question about fc_feature = fc_feature * (scale + 1) + shift in head.py. #34

Open
LMD0311 opened this issue Dec 14, 2022 · 2 comments
Open

Comments

@LMD0311
Copy link

LMD0311 commented Dec 14, 2022

Can you explain what dose this mean?

fc_feature = fc_feature * (scale + 1) + shift

@ShoufaChen
Copy link
Owner

Hi,

This is used for time embedding. We directly follow the original Diffusion model implementation: https://github.com/lucidrains/denoising-diffusion-pytorch/blob/main/denoising_diffusion_pytorch/denoising_diffusion_pytorch.py#L179-L180.

@LMD0311
Copy link
Author

LMD0311 commented Dec 24, 2022

Hi,

This is used for time embedding. We directly follow the original Diffusion model implementation: https://github.com/lucidrains/denoising-diffusion-pytorch/blob/main/denoising_diffusion_pytorch/denoising_diffusion_pytorch.py#L179-L180.

Thanks for your reply!

From my point of view, in DDPM, the time embedding should be like a residual operation, which means it may need to plus the feature. But here you use it in a BN operation (or it might be my misunderstanding), feature * (scale + 1) + shift where 'scale' and 'shift' come from time embedding.

Can you explain more?

@LMD0311 LMD0311 changed the title Question about 'fc_feature = fc_feature * (scale + 1) + shift' in head.py. Question about fc_feature = fc_feature * (scale + 1) + shift in head.py. Feb 4, 2023
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

2 participants