Add option for output shape of ViT#530
Merged
xvjiarui merged 4 commits intoopen-mmlab:masterfrom May 6, 2021
Merged
Conversation
…ation from NLC to NCHW;
Codecov Report
@@ Coverage Diff @@
## master #530 +/- ##
=======================================
Coverage 86.78% 86.79%
=======================================
Files 101 101
Lines 5246 5249 +3
Branches 847 848 +1
=======================================
+ Hits 4553 4556 +3
Misses 533 533
Partials 160 160
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
xvjiarui
reviewed
May 6, 2021
mmseg/models/backbones/vit.py
Outdated
| act_cfg=dict(type='GELU'), | ||
| norm_eval=False, | ||
| final_norm=False, | ||
| final_reshape=True, |
Collaborator
There was a problem hiding this comment.
Suggested change
| final_reshape=True, | |
| out_shape=`NCHW`, |
We may rename it as out_shape.
mmseg/models/backbones/vit.py
Outdated
|
|
||
| self.interpolate_mode = interpolate_mode | ||
| self.final_norm = final_norm | ||
| self.final_reshape = final_reshape |
Collaborator
There was a problem hiding this comment.
We may also add out_shape in ['NCHW', 'NLC'].
xvjiarui
approved these changes
May 6, 2021
bowenroom
pushed a commit
to bowenroom/mmsegmentation
that referenced
this pull request
Feb 25, 2022
* Add arg: final_reshape to control if converting output feature information from NLC to NCHW; * Fix the default value of final_reshape; * Modify arg: final_reshape to arg: out_shape; * Fix some unit test bug;
aravind-h-v
pushed a commit
to aravind-h-v/mmsegmentation
that referenced
this pull request
Mar 27, 2023
* Quick fix for the img2img tests * Remove debug lines
michaelzhang-ai
pushed a commit
to michaelzhang-ai/mmsegmentation
that referenced
this pull request
Mar 22, 2024
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.
Add arg:final_reshape for vit to control if converting output feature information from NLC to NCHW.