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

Open other normalization function #983

Open
GuillaumeErhard opened this issue Nov 21, 2024 · 1 comment
Open

Open other normalization function #983

GuillaumeErhard opened this issue Nov 21, 2024 · 1 comment

Comments

@GuillaumeErhard
Copy link

GuillaumeErhard commented Nov 21, 2024

Current implementation of Conv2dReLU, which is widely used in the codebase, has the use_batchnorm parameter that was set up first as a boolean before evolving for the use case for inplace batchnorm with an implicit string usage.

Why not modify the current API and use a normalization string parameter, which could be used to set up groupnorm or layernorm, which perform better with smaller batch sizes?

I can do the code quickly for that, and I will also add a warning that use_batchnorm might be deprecated in the future.

@qubvel
Copy link
Collaborator

qubvel commented Nov 29, 2024

Hey, it might be a cool feature! The only thing we have to consider is how to provide additional settings for layernorm or groupnorm. So it might be a dictionary instead, similar to aux_params. For example:

use_norm={"type": "layernorm", "eps": 1e-5}

Would you like to add this feature? I would appreciate a contribution if you have the bandwidth. Thank you!

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