Skip to content

[NAT, DiNAT] Add backbone class#20654

Merged
NielsRogge merged 12 commits into
huggingface:mainfrom
NielsRogge:add_nat_backbone
Dec 13, 2022
Merged

[NAT, DiNAT] Add backbone class#20654
NielsRogge merged 12 commits into
huggingface:mainfrom
NielsRogge:add_nat_backbone

Conversation

@NielsRogge

@NielsRogge NielsRogge commented Dec 7, 2022

Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR adds the NatBackbone and DinatBackbone classes, to be used for #20577.

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Dec 7, 2022

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

@NielsRogge NielsRogge changed the title [NAT] Add backbone class [NAT, DiNAT] Add backbone class Dec 7, 2022
@NielsRogge
NielsRogge requested a review from sgugger December 7, 2022 19:25
@NielsRogge
NielsRogge marked this pull request as ready for review December 7, 2022 19:25

@sgugger sgugger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding those! Please make sure to merge this after #20675 and #20660, and properly include the changes in those PRs to the new backbones here.

Comment thread src/transformers/models/dinat/modeling_dinat.py Outdated
@NielsRogge
NielsRogge requested a review from sgugger December 12, 2022 10:52

@sgugger sgugger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go with a last couple of nits!

Comment thread src/transformers/models/dinat/modeling_dinat.py Outdated
Comment thread src/transformers/models/dinat/modeling_dinat.py Outdated
Comment thread src/transformers/models/nat/modeling_nat.py Outdated
Comment thread src/transformers/models/nat/modeling_nat.py Outdated
@NielsRogge
NielsRogge merged commit 6ef4258 into huggingface:main Dec 13, 2022
mpierrau pushed a commit to mpierrau/transformers that referenced this pull request Dec 15, 2022
* Add first draft

* Add out_features attribute to config

* Add corresponding test

* Add Dinat backbone

* Add BackboneMixin

* Add Backbone mixin, improve tests

* Fix embeddings

* Fix bug

* Improve backbones

* Fix Nat backbone tests

* Fix Dinat backbone tests

* Apply suggestions

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
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

Successfully merging this pull request may close these issues.

3 participants