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

does this code work with CNN with groupnorm? #56

Closed
yxchng opened this issue Aug 29, 2023 · 1 comment
Closed

does this code work with CNN with groupnorm? #56

yxchng opened this issue Aug 29, 2023 · 1 comment

Comments

@yxchng
Copy link

yxchng commented Aug 29, 2023

if not, how can i make it work for CNN with groupnorm?

@keyu-tian
Copy link
Owner

keyu-tian commented Aug 31, 2023

@yxchng basically you can refer to what we do on BatchNorm: https://github.com/keyu-tian/SparK/blob/main/pretrain/encoder.py#L26. Theoretically speaking, only unmasked areas should be taken into account when calculating the mean and std for the normalization layer. You may mimic writing a SparseGroupNorm like our SparseBatchNorm2d.

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