MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / train

Method train

projects/mmdet3d_plugin/models/backbones/vovnet.py:366–375  ·  view source on GitHub ↗

Convert the model into training mode while keep normalization layer freezed.

(self, mode=True)

Source from the content-addressed store, hash-verified

364 param.requires_grad = False
365
366 def train(self, mode=True):
367 """Convert the model into training mode while keep normalization layer
368 freezed."""
369 super(VoVNet, self).train(mode)
370 self._freeze_stages()
371 if mode and self.norm_eval:
372 for m in self.modules():
373 # trick: eval have effect on BatchNorm only
374 if isinstance(m, _BatchNorm):
375 m.eval()

Callers 1

obtain_history_bevMethod · 0.80

Calls 1

_freeze_stagesMethod · 0.95

Tested by

no test coverage detected