MCPcopy Create free account
hub / github.com/deepbrainai-research/float / _basic_init

Method _basic_init

models/float/FMT.py:231–235  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

229
230 def initialize_weights(self) -> None:
231 def _basic_init(module):
232 if isinstance(module, nn.Linear):
233 torch.nn.init.xavier_uniform_(module.weight)
234 if module.bias is not None:
235 nn.init.constant_(module.bias, 0)
236
237 self.apply(_basic_init)
238

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected