mirror of
https://github.com/wassname/TTS.git
synced 2026-10-26 12:20:32 +08:00
bug fix
This commit is contained in:
1 parent
68dbcee746
commit
1cd25ccf0d
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user