Merge pull request #96 from iclementine/develop

fix experiments for waveflow and wavenet
This commit is contained in:
Feiyu Chan 2021-02-22 14:22:42 +08:00 committed by GitHub
commit dc055bde0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -118,8 +118,9 @@ class Experiment(ExperimentBase):
iteration_time)
msg += "loss: {:>.6f}".format(loss_value)
self.logger.info(msg)
self.visualizer.add_scalar(
"train/loss", loss_value, global_step=self.iteration)
if dist.get_rank() == 0:
self.visualizer.add_scalar(
"train/loss", loss_value, global_step=self.iteration)
@mp_tools.rank_zero_only
@paddle.no_grad()

View File

@ -131,8 +131,9 @@ class Experiment(ExperimentBase):
iteration_time)
msg += "loss: {:>.6f}".format(loss_value)
self.logger.info(msg)
self.visualizer.add_scalar(
"train/loss", loss_value, global_step=self.iteration)
if dist.get_rank() == 0:
self.visualizer.add_scalar(
"train/loss", loss_value, global_step=self.iteration)
@mp_tools.rank_zero_only
@paddle.no_grad()