Skip to content

Commit

Permalink
Merge pull request #138 from taroushirani/fix_svs_pr
Browse files Browse the repository at this point in the history
Wrong device assignment of svs.py
  • Loading branch information
r9y9 committed Aug 1, 2022
2 parents 3fe4b7c + b3f5c45 commit 40a62be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nnsvs/svs.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,14 @@ def svs(

# Learned post-filter using nnsvs
if post_filter_type == "nnsvs" and self.postfilter_model is not None:
in_feats = torch.from_numpy(acoustic_features).float().unsqueeze(0)
in_feats = (
torch.from_numpy(acoustic_features).float().to(self.device).unsqueeze(0)
self.postfilter_out_scaler.transform(in_feats).float().to(self.device)
)
in_feats = self.postfilter_out_scaler.transform(in_feats).float()
out_feats = self.postfilter_model.inference(in_feats, [in_feats.shape[1]])
acoustic_features = (
self.postfilter_out_scaler.inverse_transform(out_feats)
self.postfilter_out_scaler.inverse_transform(out_feats.cpu())
.squeeze(0)
.cpu()
.numpy()
)

Expand Down

0 comments on commit 40a62be

Please sign in to comment.