MCPcopy Create free account
hub / github.com/FireRedTeam/FireRedTTS2 / _init_weights

Method _init_weights

fireredtts2/codec/decoder.py:599–602  ·  view source on GitHub ↗
(self, m)

Source from the content-addressed store, hash-verified

597 self.apply(self._init_weights)
598
599 def _init_weights(self, m):
600 if isinstance(m, nn.Conv1d):
601 nn.init.trunc_normal_(m.weight, std=0.02)
602 nn.init.constant_(m.bias, 0)
603
604 def forward(self, x: torch.Tensor, x_lens: torch.Tensor):
605 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected