MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / init_weights

Method init_weights

timm/models/hrnet.py:674–681  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

672 return nn.Sequential(*modules), num_inchannels
673
674 def init_weights(self):
675 for m in self.modules():
676 if isinstance(m, nn.Conv2d):
677 nn.init.kaiming_normal_(
678 m.weight, mode='fan_out', nonlinearity='relu')
679 elif isinstance(m, nn.BatchNorm2d):
680 nn.init.constant_(m.weight, 1)
681 nn.init.constant_(m.bias, 0)
682
683 def get_classifier(self):
684 return self.classifier

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected