Merge pull request #48 from iclementine/reborn

add set_device at experiment setup
This commit is contained in:
Feiyu Chan 2020-12-11 19:50:27 +08:00 committed by GitHub
commit 4de58f4a99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -488,7 +488,7 @@ class ConditionalWaveFlow(nn.LayerList):
z, log_det_jacobian = self.decoder(audio, condition)
return z, log_det_jacobian
@paddle.fluid.dygraph.no_grad
@paddle.no_grad()
def synthesize(self, mel):
condition = self.encoder(mel, trim_conv_artifact=True) #(B, C, T)
batch_size, _, time_steps = condition.shape

View File

@ -75,6 +75,7 @@ class ExperimentBase(object):
self.args = args
def setup(self):
paddle.set_device(self.args.device)
if self.parallel:
self.init_parallel()