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

Incorrect stage freeze on RIFormer Model #1573

Merged
merged 2 commits into from
May 22, 2023
Merged

Incorrect stage freeze on RIFormer Model #1573

merged 2 commits into from
May 22, 2023

Conversation

MGAMZ
Copy link
Contributor

@MGAMZ MGAMZ commented May 19, 2023

Motivation

The reproduce code of RIFormer seems to be incorrect when handling stage freeze. This may cause an incorrect result.
Add the correct arxiv website of RIFormer to Readme.

Modification

Repair the index in for loop of freeze_stage. Change the default value of freeze_stage to -1.
Add the paper pdf website to its Readme.

BC-breaking (Optional)

I'm uncertain whether this modification will disrupt the standardization of the 'freeze_stage' parameter in the mmpretrain project.

MGAMZ added 2 commits May 19, 2023 13:08
the default value of frozen stage is set to 0, and the doc says that this will lead to no stage be frozen. But the actual case is the patch_embed will be freezed.

This may cause incorrect training, thus influencing the result.

I suggest a careful review.
@MGAMZ MGAMZ changed the title Patch 1 Incorrect stage freeze on RIFormer Model May 19, 2023
@MGAMZ
Copy link
Contributor Author

MGAMZ commented May 20, 2023

Please note that the "if" condition of freeze operation on self.patch_embed itself was not modified (line 364), but all code modification is actually trying to fix its logical mistake.

Copy link
Collaborator

@techmonsterwang techmonsterwang left a comment

Choose a reason for hiding this comment

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

LGTM

@mzr1996 mzr1996 merged commit 023d686 into open-mmlab:dev May 22, 2023
4 of 7 checks passed
zzc98 pushed a commit to zzc98/mmclassification that referenced this pull request May 22, 2023
* [Doc] RIFormer's README did not link to its paper properly

* Incorrect code for reproducing RIFormer 

the default value of frozen stage is set to 0, and the doc says that this will lead to no stage be frozen. But the actual case is the patch_embed will be freezed.

This may cause incorrect training, thus influencing the result.

I suggest a careful review.
@MGAMZ MGAMZ deleted the patch-1 branch May 22, 2023 11:51
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.

None yet

3 participants