add set_device at experiment setup

This commit is contained in:
chenfeiyu 2020-12-11 19:45:49 +08:00
parent a5f1605051
commit a079e767df
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

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