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

No parameters for RGBuvHistBlock? #26

Open
sidsingla opened this issue Jul 1, 2022 · 4 comments
Open

No parameters for RGBuvHistBlock? #26

sidsingla opened this issue Jul 1, 2022 · 4 comments

Comments

@sidsingla
Copy link

Hi,
I am checking the parameters for RGBuvHistBlock as the gradients for the parameters of the block are being set here -

set_requires_grad(self.histBlock, True)

What I am seeing is the block doesn't have parameters. Could anyone confirm if this is the case? And if yes, how is the block getting trained without having parameters and hence, no gradients?

I just want to use this block and not the whole GAN architecture for my own case.

Thanks!

@mahmoudnafifi
Copy link
Owner

That is true, the block does not have learnable params. It comprises a set of differentiable operations to compute the histogram and it is helpful to compute histogram loss (like the case in this paper) or you may use it to compute the histogram of network intermediate images during training (check this paper for example). In the latter case, you may need to introduce some learnable parameters that control some properties of the histogram feature (e.g., the smoothness of each bin).

@sidsingla
Copy link
Author

Thank you so much! The explanation helps a lot. That means the line 741 shared above doesn't makes sense and it can be removed!

@mahmoudnafifi
Copy link
Owner

Yes, I forgot to remove it after some early experiments that include learnable parameters in the histogram feature.

@sidsingla
Copy link
Author

I can raise a PR to remove it if you want.

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