MCPcopy Create free account
hub / github.com/TPCD/DCCL / _init_weights

Method _init_weights

model/attribute_classifier.py:43–47  ·  view source on GitHub ↗
(self, m)

Source from the content-addressed store, hash-verified

41 self.apply(self._init_weights)
42
43 def _init_weights(self, m):
44 if isinstance(m, nn.Linear):
45 trunc_normal_(m.weight, std=.02)
46 if isinstance(m, nn.Linear) and m.bias is not None:
47 nn.init.constant_(m.bias, 0)
48
49 def forward(self, x):
50 probability = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected