Skip to content

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

@abc5z7

Description

@abc5z7

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions