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

Method _init_weights

model/attribute_transformer.py:798–802  ·  view source on GitHub ↗
(self, m)

Source from the content-addressed store, hash-verified

796 self.apply(self._init_weights)
797
798 def _init_weights(self, m):
799 if isinstance(m, nn.Linear):
800 trunc_normal_(m.weight, std=.02)
801 if isinstance(m, nn.Linear) and m.bias is not None:
802 nn.init.constant_(m.bias, 0)
803
804 def forward(self, x, attribute_feat=None, attribute_label=None):
805 if attribute_label is not None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected