transformers
transformers copied to clipboard
Add ConvNeXt-V2 Model
What does this PR do?
Adds ConvNeXt-V2 to transformers. original repo: https://github.com/facebookresearch/ConvNeXt-V2 paper: https://arxiv.org/abs/2301.00808
Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the contributor guideline, Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [x] Did you write any new necessary tests?
@alaradirik
It does look like the model code is exactly the same at a first glance (saw everything is copied from ConvNext). If that is the case, yes to re-using the code of ConvNext, but if we need to make modifications in the convnext modeling file, we should add ConvNext V2 as a new model like in the PR.
It does look like the model code is exactly the same at a first glance (saw everything is copied from ConvNext). If that is the case, yes to re-using the code of ConvNext, but if we need to make modifications in the convnext modeling file, we should add ConvNext V2 as a new model like in the PR.
Yes, the code is almost the same, but it adds a Global Response Normalization (GRN) module and removes the layer_scale_parameter from the ConvNeXtV2Layer. Makes more sense to add it as a new model then.
CC @IMvision12
Thanks for the review @alaradirik I will address all comments!
The documentation is not available anymore as the PR was closed or merged.