MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / weights_init

Method weights_init

models/models.py:53–59  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

51 # custom weights initialization
52 @staticmethod
53 def weights_init(m):
54 classname = m.__class__.__name__
55 if classname.find('Conv') != -1:
56 nn.init.kaiming_normal_(m.weight.data)
57 elif classname.find('BatchNorm') != -1:
58 m.weight.data.fill_(1.)
59 m.bias.data.fill_(1e-4)
60
61 @staticmethod
62 def build_encoder(arch='resnet50dilated', fc_dim=512, weights=''):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected