Convert the model into training mode will keeping the normalization layer freezed.
(self, mode=True)
| 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() |
nothing calls this directly
no outgoing calls
no test coverage detected