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

about the dimension #14

Open
JINzezhong7 opened this issue Mar 7, 2024 · 3 comments
Open

about the dimension #14

JINzezhong7 opened this issue Mar 7, 2024 · 3 comments

Comments

@JINzezhong7
Copy link

Hi, thanks for opening the source code. I read the paper, I find you use logits and features before pooling to perform diffusion. but for the logits, I guess the dimension is [B, C] B is the batch size, and C is the class number. This will cause a dimension mismatch in autoencoder, how to solve it. Thanks for your reply.

@hunto
Copy link
Owner

hunto commented Mar 11, 2024

Hi @JINzezhong7 ,

You can see the code below. For logits with shape [B, C], we reshape it to [B, C, 1, 1], and use 1x1 convolutions in diffusion loss (diffusion model, autoencoder).

self.diff[tm](self._reshape_BCHW(self._student_out[sm]), self._reshape_BCHW(self._teacher_out[tm]))

@ST0427
Copy link

ST0427 commented Mar 14, 2024

Hi, for this diffusion distillation, is it diffkd with both features and logits? Or just diffkd with features. looking forward to your reply.

@JINzezhong7
Copy link
Author

JINzezhong7 commented Apr 14, 2024 via email

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