[Fix] Fix some vit init bugs#609
Merged
xvjiarui merged 8 commits intoopen-mmlab:masterfrom Jun 19, 2021
Merged
Conversation
added 2 commits
June 19, 2021 03:09
Codecov Report
@@ Coverage Diff @@
## master #609 +/- ##
==========================================
+ Coverage 85.45% 85.57% +0.11%
==========================================
Files 101 101
Lines 5220 5226 +6
Branches 840 842 +2
==========================================
+ Hits 4461 4472 +11
+ Misses 586 583 -3
+ Partials 173 171 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
xvjiarui
reviewed
Jun 19, 2021
mmseg/models/backbones/vit.py
Outdated
| self.load_state_dict(state_dict, False) | ||
|
|
||
| elif pretrained is None: | ||
| elif isinstance(self.pretrained, type(None)): |
added 2 commits
June 19, 2021 17:53
xvjiarui
reviewed
Jun 19, 2021
mmseg/models/backbones/vit.py
Outdated
| act_cfg (dict): The activation config for FFNs. | ||
| Defalut: dict(type='GELU'). | ||
| final_norm (bool): Whether to add a additional layer to normalize | ||
| first_norm (bool): Whether to add a norm in PatchEmbed Block. |
Collaborator
There was a problem hiding this comment.
Suggested change
| first_norm (bool): Whether to add a norm in PatchEmbed Block. | |
| patch_norm (bool): Whether to add a norm in PatchEmbed Block. |
xvjiarui
reviewed
Jun 19, 2021
mmseg/models/backbones/vit.py
Outdated
Comment on lines
+270
to
+275
| self.patch_embed = PatchEmbed( | ||
| img_size=img_size, | ||
| patch_size=patch_size, | ||
| in_channels=in_channels, | ||
| embed_dim=embed_dims, | ||
| norm_cfg=None) |
Collaborator
There was a problem hiding this comment.
Suggested change
| self.patch_embed = PatchEmbed( | |
| img_size=img_size, | |
| patch_size=patch_size, | |
| in_channels=in_channels, | |
| embed_dim=embed_dims, | |
| norm_cfg=None) | |
| self.patch_embed = PatchEmbed( | |
| img_size=img_size, | |
| patch_size=patch_size, | |
| in_channels=in_channels, | |
| embed_dim=embed_dims, | |
| norm_cfg=norm_cfg if patch_norm else None) |
xvjiarui
approved these changes
Jun 19, 2021
bowenroom
pushed a commit
to bowenroom/mmsegmentation
that referenced
this pull request
Feb 25, 2022
* [Fix] Fix vit init bug * Add some vit unit tests * Modify module import * Fix pretrain weights bug * Modify pretrained judge * Add some unit tests to improve code cov * Optimize code * Fix vit unit test
aravind-h-v
pushed a commit
to aravind-h-v/mmsegmentation
that referenced
this pull request
Mar 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix some new style parameters init bug for vit.
Add some unit test for vit to improve code cov.