Skip to content

why here it has frozen bn twice? #9

@rainylt

Description

@rainylt

in FCOS.Pytorch/model/fcos.py

        def freeze_bn(module):
            if isinstance(module,nn.BatchNorm2d):
                module.eval()
            classname = module.__class__.__name__
            if classname.find('BatchNorm') != -1:
                for p in module.parameters(): p.requires_grad=False

Since module.eval() has frozen bn, why you additionally set p.requires_grad=False? Is there another module called BatchNorm*?

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