DiffusionDet icon indicating copy to clipboard operation
DiffusionDet copied to clipboard

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

Open LMD0311 opened this issue 3 years ago • 2 comments

Can you explain what dose this mean? https://github.com/ShoufaChen/DiffusionDet/blob/1efb36d4b0b721f2d509bc72656235a94d73ab02/diffusiondet/head.py#L274

LMD0311 avatar Dec 14 '22 12:12 LMD0311

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.

ShoufaChen avatar Dec 15 '22 09:12 ShoufaChen

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 avatar Dec 24 '22 11:12 LMD0311