MCPcopy Create free account
hub / github.com/ZHKKKe/MODNet / freeze_norm

Method freeze_norm

torchscript/modnet_torchscript.py:241–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

239 return pred_matte
240
241 def freeze_norm(self):
242 norm_types = [nn.BatchNorm2d, nn.InstanceNorm2d]
243 for m in self.modules():
244 for n in norm_types:
245 if isinstance(m, n):
246 m.eval()
247 continue
248
249 def _init_conv(self, conv):
250 nn.init.kaiming_uniform_(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected