MCPcopy
hub / github.com/open-mmlab/mmpretrain / train

Method train

mmpretrain/models/backbones/vig.py:666–673  ·  view source on GitHub ↗
(self, mode=True)

Source from the content-addressed store, hash-verified

664 param.requires_grad = False
665
666 def train(self, mode=True):
667 super(Vig, self).train(mode)
668 self._freeze_stages()
669 if mode and self.norm_eval:
670 for m in self.modules():
671 # trick: eval have effect on BatchNorm only
672 if isinstance(m, _BatchNorm):
673 m.eval()
674
675
676@MODELS.register_module()

Callers 15

mainFunction · 0.45
train_single_foldFunction · 0.45
simulate_trainFunction · 0.45
trainMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
test_simsiam_hookMethod · 0.45
test_densecl_hookMethod · 0.45
test_after_train_iterMethod · 0.45
test_load_state_dictMethod · 0.45

Calls 1

_freeze_stagesMethod · 0.95

Tested by 15

test_simsiam_hookMethod · 0.36
test_densecl_hookMethod · 0.36
test_after_train_iterMethod · 0.36
test_load_state_dictMethod · 0.36
test_swav_hookMethod · 0.36
test_do_switchMethod · 0.36
test_resumeMethod · 0.36
test_seresnextFunction · 0.36
test_regnet_backboneFunction · 0.36
test_resnet_cifarFunction · 0.36