class_docstr: Generator module in JETS.
code: def _reset_parameters(
      self, init_type: str, init_enc_alpha: float, init_dec_alpha: float
  ):
      # 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 Any, Dict, List, Optional, Sequence, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_tts.hifigan import HiFiGANGenerator
  from espnet2.gan_tts.jets.alignments import AlignmentModule, average_by_duration, viterbi_decode
  from espnet2.gan_tts.jets.length_regulator import GaussianUpsampling
  from espnet2.gan_tts.utils import get_random_segments
  from espnet2.torch_utils.initialize import initialize
  from espnet2.tts.fastspeech2.variance_predictor import VariancePredictor
  from espnet2.tts.gst.style_encoder import StyleEncoder
  from espnet.nets.pytorch_backend.conformer.encoder import Encoder
  from espnet.nets.pytorch_backend.fastspeech.duration_predictor import DurationPredictor
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, make_pad_mask
  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 6 for calling the JETSGenerator obj's underlying member method code with example usage: obj._reset_parameters(init_type, init_enc_alpha, init_dec_alpha) without return types