MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / train

Method train

segmentation/backbones/cgnet.py:364–372  ·  view source on GitHub ↗

Convert the model into training mode will keeping the normalization layer freezed.

(self, mode=True)

Source from the content-addressed store, hash-verified

362 return output
363
364 def train(self, mode=True):
365 """Convert the model into training mode will keeping the normalization
366 layer freezed."""
367 super(CGNet, self).train(mode)
368 if mode and self.norm_eval:
369 for m in self.modules():
370 # trick: eval have effect on BatchNorm only
371 if isinstance(m, _BatchNorm):
372 m.eval()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected