diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index de7e439d..133346f6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -37,8 +37,8 @@ In the worse case provide steps to reproduce the behaviour. You can either run `TTS/bin/collect_env_info.py` ```bash -wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_details.py -python collect_env_details.py +wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_info.py +python collect_env_info.py ``` or fill in the fields below manually. diff --git a/TTS/vocoder/configs/shared_configs.py b/TTS/vocoder/configs/shared_configs.py index c5d6a8b4..9ff6f790 100644 --- a/TTS/vocoder/configs/shared_configs.py +++ b/TTS/vocoder/configs/shared_configs.py @@ -113,8 +113,10 @@ class BaseGANVocoderConfig(BaseVocoderConfig): Parameters for the generator learning rate scheduler. Defaults to `{"gamma": 0.999, "last_epoch": -1}`. lr_scheduler_disc (torch.optim.Scheduler): Learning rate scheduler for the discriminator. Defaults to `ExponentialLR`. - lr_scheduler_dict_params (dict): + lr_scheduler_disc_params (dict): Parameters for the discriminator learning rate scheduler. Defaults to `{"gamma": 0.999, "last_epoch": -1}`. + scheduler_after_epoch (bool): + Whether to update the learning rate schedulers after each epoch. Defaults to True. use_pqmf (bool): enable / disable PQMF for subband approximation at training. Defaults to False. steps_to_start_discriminator (int): @@ -173,6 +175,7 @@ class BaseGANVocoderConfig(BaseVocoderConfig): lr_scheduler_gen_params: dict = field(default_factory=lambda: {"gamma": 0.999, "last_epoch": -1}) lr_scheduler_disc: str = "ExponentialLR" # one of the schedulers from https:#pytorch.org/docs/stable/optim.html lr_scheduler_disc_params: dict = field(default_factory=lambda: {"gamma": 0.999, "last_epoch": -1}) + scheduler_after_epoch: bool = True use_pqmf: bool = False # enable/disable using pqmf for multi-band training. (Multi-band MelGAN) steps_to_start_discriminator = 0 # start training the discriminator after this number of steps. diff --git a/TTS/vocoder/models/gan.py b/TTS/vocoder/models/gan.py index e36c2cd1..76fee505 100644 --- a/TTS/vocoder/models/gan.py +++ b/TTS/vocoder/models/gan.py @@ -202,7 +202,9 @@ class GAN(BaseVocoder): ) -> Tuple[Dict, np.ndarray]: """Call `_log()` for training.""" ap = assets["audio_processor"] - self._log("train", ap, batch, outputs) + figures, audios = self._log("eval", ap, batch, outputs) + logger.eval_figures(steps, figures) + logger.eval_audios(steps, audios, ap.sample_rate) @torch.no_grad() def eval_step(self, batch: Dict, criterion: nn.Module, optimizer_idx: int) -> Tuple[Dict, Dict]: @@ -214,7 +216,9 @@ class GAN(BaseVocoder): ) -> Tuple[Dict, np.ndarray]: """Call `_log()` for evaluation.""" ap = assets["audio_processor"] - self._log("eval", ap, batch, outputs) + figures, audios = self._log("eval", ap, batch, outputs) + logger.eval_figures(steps, figures) + logger.eval_audios(steps, audios, ap.sample_rate) def load_checkpoint( self,