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

anyone knows why _freeze_stages() starts from block[0]? #319

Open
abc5z7 opened this issue Jun 13, 2024 · 0 comments
Open

anyone knows why _freeze_stages() starts from block[0]? #319

abc5z7 opened this issue Jun 13, 2024 · 0 comments

Comments

@abc5z7
Copy link

abc5z7 commented Jun 13, 2024

thanks for your great code. But i have a question about freeze parameters in mmpose/models/backbones/vit.py line 273

    def _freeze_stages(self):
        """Freeze parameters."""
...
        for i in range(1, self.frozen_stages + 1):
            m = self.blocks[i]
            m.eval()
            for param in m.parameters():
                param.requires_grad = False
...

when i need freeze all the parameters but the code shows it starts from index 1. As block[0] is alway require gradient.

Is block[0] have any other reasons? This setting is somehow training strategy or something else?

thanks again!

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

No branches or pull requests

1 participant