Path: blob/master/examples/hifigan/conf/hifigan.v2.yaml
1559 views
1# This is the hyperparameter configuration file for Hifigan.2# Please make sure this is adjusted for the LJSpeech dataset. If you want to3# apply to the other dataset, you might need to carefully change some parameters.4# This configuration performs 4000k iters.56###########################################################7# FEATURE EXTRACTION SETTING #8###########################################################9sampling_rate: 22050 # Sampling rate of dataset.10hop_size: 256 # Hop size.11format: "npy"121314###########################################################15# GENERATOR NETWORK ARCHITECTURE SETTING #16###########################################################17model_type: "hifigan_generator"1819hifigan_generator_params:20out_channels: 121kernel_size: 722filters: 12823use_bias: true24upsample_scales: [8, 8, 2, 2]25stacks: 326stack_kernel_size: [3, 7, 11]27stack_dilation_rate: [[1, 3, 5], [1, 3, 5], [1, 3, 5]]28use_final_nolinear_activation: true29is_weight_norm: false3031###########################################################32# DISCRIMINATOR NETWORK ARCHITECTURE SETTING #33###########################################################34hifigan_discriminator_params:35out_channels: 1 # Number of output channels (number of subbands).36period_scales: [2, 3, 5, 7, 11] # List of period scales.37n_layers: 5 # Number of layer of each period discriminator.38kernel_size: 5 # Kernel size.39strides: 3 # Strides40filters: 8 # In Conv filters of each period discriminator41filter_scales: 4 # Filter scales.42max_filters: 512 # maximum filters of period discriminator's conv.43is_weight_norm: false # Use weight-norm or not.4445melgan_discriminator_params:46out_channels: 1 # Number of output channels.47scales: 3 # Number of multi-scales.48downsample_pooling: "AveragePooling1D" # Pooling type for the input downsampling.49downsample_pooling_params: # Parameters of the above pooling function.50pool_size: 451strides: 252kernel_sizes: [5, 3] # List of kernel size.53filters: 16 # Number of channels of the initial conv layer.54max_downsample_filters: 512 # Maximum number of channels of downsampling layers.55downsample_scales: [4, 4, 4, 4] # List of downsampling scales.56nonlinear_activation: "LeakyReLU" # Nonlinear activation function.57nonlinear_activation_params: # Parameters of nonlinear activation function.58alpha: 0.259is_weight_norm: false # Use weight-norm or not.6061###########################################################62# STFT LOSS SETTING #63###########################################################64stft_loss_params:65fft_lengths: [1024, 2048, 512] # List of FFT size for STFT-based loss.66frame_steps: [120, 240, 50] # List of hop size for STFT-based loss67frame_lengths: [600, 1200, 240] # List of window length for STFT-based loss.6869###########################################################70# ADVERSARIAL LOSS SETTING #71###########################################################72lambda_feat_match: 10.073lambda_adv: 4.07475###########################################################76# DATA LOADER SETTING #77###########################################################78batch_size: 16 # Batch size for each GPU with assuming that gradient_accumulation_steps == 1.79batch_max_steps: 8192 # Length of each audio in batch for training. Make sure dividable by hop_size.80batch_max_steps_valid: 81920 # Length of each audio for validation. Make sure dividable by hope_size.81remove_short_samples: true # Whether to remove samples the length of which are less than batch_max_steps.82allow_cache: true # Whether to allow cache in dataset. If true, it requires cpu memory.83is_shuffle: true # shuffle dataset after each epoch.8485###########################################################86# OPTIMIZER & SCHEDULER SETTING #87###########################################################88generator_optimizer_params:89lr_fn: "PiecewiseConstantDecay"90lr_params:91boundaries: [100000, 200000, 300000, 400000, 500000, 600000, 700000]92values: [0.000125, 0.000125, 0.0000625, 0.0000625, 0.0000625, 0.00003125, 0.000015625, 0.000001]93amsgrad: false9495discriminator_optimizer_params:96lr_fn: "PiecewiseConstantDecay"97lr_params:98boundaries: [100000, 200000, 300000, 400000, 500000]99values: [0.00025, 0.000125, 0.0000625, 0.00003125, 0.000015625, 0.000001]100amsgrad: false101102gradient_accumulation_steps: 1 # should be even number or 1.103###########################################################104# INTERVAL SETTING #105###########################################################106discriminator_train_start_steps: 100000 # steps begin training discriminator107train_max_steps: 4000000 # Number of training steps.108save_interval_steps: 20000 # Interval steps to save checkpoint.109eval_interval_steps: 5000 # Interval steps to evaluate the network.110log_interval_steps: 200 # Interval steps to record the training log.111112###########################################################113# OTHER SETTING #114###########################################################115num_save_intermediate_results: 1 # Number of batch to be saved as intermediate results.116117118