class_docstr: ProDiff module.
  
  This is a module of ProDiff described in `ProDiff: Progressive Fast Diffusion Model
  for High-Quality Text-to-Speech`_.
  
  .. _`ProDiff: Progressive Fast Diffusion Model for High-Quality Text-to-Speech`:
      https://arxiv.org/abs/2207.06389
class_docstr_tok: ["ProDiff","module",".","This","is","a","module","of","ProDiff","described","in","`","ProDiff",":","Progressive","Fast","Diffusion","Model","for","High-Quality","Text-to-Speech","`","_",".","..","_","`","ProDiff",":","Progressive","Fast","Diffusion","Model","for","High-Quality","Text-to-Speech","`",":","https",":","\/\/arxiv.org\/abs\/2207.06389"]
docstr: Reset parameters of the model.
  
  Args:
      init_type (str): Type of initialization.
      init_enc_alpha (float): Value of the initialization for the encoder.
      init_dec_alpha (float): Value of the initialization for the decoder.
docstr_tok: ["Reset","parameters","of","the","model",".","Args",":","init_type","(","str",")",":","Type","of","initialization",".","init_enc_alpha","(","float",")",":","Value","of","the","initialization","for","the","encoder",".","init_dec_alpha","(","float",")",":","Value","of","the","initialization","for","the","decoder","."]
code: def _reset_parameters(
      self, init_type: str, init_enc_alpha: float, init_dec_alpha: float
  ):
      """Reset parameters of the model.
  
      Args:
          init_type (str): Type of initialization.
          init_enc_alpha (float): Value of the initialization for the encoder.
          init_dec_alpha (float): Value of the initialization for the decoder.
  
      """
      # initialize parameters
      if init_type != "pytorch":
          initialize(self, init_type)
  
      # initialize alpha in scaled positional encoding
      if self.encoder_type == "transformer" and self.use_scaled_pos_enc:
          self.encoder.embed[-1].alpha.data = torch.tensor(
              init_enc_alpha
          )
      if self.decoder_type == "transformer" and self.use_scaled_pos_enc:
          self.decoder.embed[-1].alpha.data = torch.tensor(
              init_dec_alpha
          )
  
imports: import logging
  from typing import Dict, Optional, Sequence, Tuple
  import torch
  import torch.nn.functional
  from typeguard import check_argument_types
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.torch_utils.initialize import initialize
  from espnet2.tts.abs_tts import AbsTTS
  from espnet2.tts.fastspeech2.variance_predictor import VariancePredictor
  from espnet2.tts.gst.style_encoder import StyleEncoder
  from espnet2.tts.prodiff.denoiser import SpectogramDenoiser
  from espnet2.tts.prodiff.loss import ProDiffLoss
  from espnet.nets.pytorch_backend.conformer.encoder import Encoder
  from espnet.nets.pytorch_backend.fastspeech.duration_predictor import DurationPredictor
  from espnet.nets.pytorch_backend.fastspeech.length_regulator import LengthRegulator
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, make_pad_mask
  from espnet.nets.pytorch_backend.tacotron2.decoder import Postnet
  from espnet.nets.pytorch_backend.transformer.embedding import PositionalEncoding, ScaledPositionalEncoding
  from espnet.nets.pytorch_backend.transformer.encoder import Encoder
label_desc: Use image node_id 7 for calling the ProDiff obj's underlying member method code with example usage: obj._reset_parameters(init_type, init_enc_alpha, init_dec_alpha) without return types