MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / reset_parameters

Method reset_parameters

bitsandbytes/nn/modules.py:183–185  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

181 GlobalOptimManager.get_instance().register_module_override(self, "weight", {"optim_bits": 32})
182
183 def reset_parameters(self) -> None:
184 torch.nn.init.xavier_uniform_(self.weight)
185 self._fill_padding_idx_with_zero()
186
187 """ !!! This is a redefinition of _fill_padding_idx_with_zero in torch.nn.Embedding
188 to make the Layer compatible with Pytorch < 1.9.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected