mirror of https://github.com/coqui-ai/TTS.git
Merge branch 'dev' of https://github.com/coqui-ai/TTS into dev
This commit is contained in:
commit
38f5a11125
|
@ -37,8 +37,8 @@ In the worse case provide steps to reproduce the behaviour.
|
||||||
You can either run `TTS/bin/collect_env_info.py`
|
You can either run `TTS/bin/collect_env_info.py`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_details.py
|
wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_info.py
|
||||||
python collect_env_details.py
|
python collect_env_info.py
|
||||||
```
|
```
|
||||||
|
|
||||||
or fill in the fields below manually.
|
or fill in the fields below manually.
|
||||||
|
|
|
@ -113,8 +113,10 @@ class BaseGANVocoderConfig(BaseVocoderConfig):
|
||||||
Parameters for the generator learning rate scheduler. Defaults to `{"gamma": 0.999, "last_epoch": -1}`.
|
Parameters for the generator learning rate scheduler. Defaults to `{"gamma": 0.999, "last_epoch": -1}`.
|
||||||
lr_scheduler_disc (torch.optim.Scheduler):
|
lr_scheduler_disc (torch.optim.Scheduler):
|
||||||
Learning rate scheduler for the discriminator. Defaults to `ExponentialLR`.
|
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}`.
|
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):
|
use_pqmf (bool):
|
||||||
enable / disable PQMF for subband approximation at training. Defaults to False.
|
enable / disable PQMF for subband approximation at training. Defaults to False.
|
||||||
steps_to_start_discriminator (int):
|
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_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: 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})
|
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)
|
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.
|
steps_to_start_discriminator = 0 # start training the discriminator after this number of steps.
|
||||||
|
|
|
@ -202,7 +202,9 @@ class GAN(BaseVocoder):
|
||||||
) -> Tuple[Dict, np.ndarray]:
|
) -> Tuple[Dict, np.ndarray]:
|
||||||
"""Call `_log()` for training."""
|
"""Call `_log()` for training."""
|
||||||
ap = assets["audio_processor"]
|
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()
|
@torch.no_grad()
|
||||||
def eval_step(self, batch: Dict, criterion: nn.Module, optimizer_idx: int) -> Tuple[Dict, Dict]:
|
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]:
|
) -> Tuple[Dict, np.ndarray]:
|
||||||
"""Call `_log()` for evaluation."""
|
"""Call `_log()` for evaluation."""
|
||||||
ap = assets["audio_processor"]
|
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(
|
def load_checkpoint(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Reference in New Issue