I recently ran into this error while training Univnet and MultibandMelgan vocoder.
ValueError: [!] Target loss not found in the keep_avg_target. You might be exiting the training loop before it is computed or set the target_loss in the model config incorrectly.
This error in UnivNet and MultibandMelGAN arises because the default target_loss
is set to 'loss_0'
, which represents the discriminator loss. However, the discriminator is not activated until steps_to_start_discriminator
(defaulting to 200,000), meaning loss_0
is unavailable during the initial training phase. Consequently, the training process cannot find the specified target loss. Setting target_loss='loss_1'
resolves this issue by instructing the training to track the generator loss (loss_1
), which is active from the beginning of training, thus ensuring a valid target loss is always available, even before the discriminator starts contributing to the learning process.
target_loss
is set to 'loss_0'
, which represents the discriminator loss. However, the discriminator is not activated until steps_to_start_discriminator
(defaulting to 200,000), meaning loss_0
is unavailable during the initial training phase. Consequently, the training process cannot find the specified target loss. Setting target_loss='loss_1'
resolves this issue by instructing the training to track the generator loss (loss_1
), which is active from the beginning of training, thus ensuring a valid target loss is always available, even before the discriminator starts contributing to the learning process.