From 1cd25ccf0d3842fc954263f5d538827cfb82e040 Mon Sep 17 00:00:00 2001 From: erogol Date: Tue, 12 May 2020 16:16:55 +0200 Subject: [PATCH] bug fix --- utils/synthesis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/synthesis.py b/utils/synthesis.py index ae3a7df7..188a3acf 100644 --- a/utils/synthesis.py +++ b/utils/synthesis.py @@ -24,7 +24,7 @@ def text_to_seqvec(text, CONFIG, use_cuda): def numpy_to_torch(np_array, dtype, cuda=False): if np_array is None: return None - tensor = torch.Tensor(np_array, dtype=dtype) + tensor = torch.as_tensor(np_array, dtype=dtype) if cuda: return tensor.cuda() return tensor