espnet2.svs.singing_tacotron.decoder.decoder_init
Less than 1 minute
espnet2.svs.singing_tacotron.decoder.decoder_init
espnet2.svs.singing_tacotron.decoder.decoder_init(m)
Initialize decoder parameters.
This function initializes the parameters of the decoder. Specifically, it applies Xavier uniform initialization to the weights of Conv1d layers in the decoder model using the “tanh” gain.
- Parameters:m (torch.nn.Module) – The module (layer) whose parameters are to be initialized.
- Raises:ValueError – If the input module is not an instance of torch.nn.Module.
Examples
>>> layer = torch.nn.Conv1d(in_channels=1, out_channels=1, kernel_size=3)
>>> decoder_init(layer)
>>> print(layer.weight) # Initialized weights