优化代码结构
This commit is contained in:
parent
46c0e9b2fe
commit
ccba65151e
@ -19,14 +19,11 @@ import soundfile as sf
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from fairseq import checkpoint_utils
|
from fairseq import checkpoint_utils
|
||||||
|
|
||||||
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
device = "cpu"
|
||||||
|
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
device = "cuda"
|
device = "cuda"
|
||||||
elif torch.backends.mps.is_available():
|
elif torch.backends.mps.is_available():
|
||||||
device = "mps"
|
device = "mps"
|
||||||
else:
|
|
||||||
device = "cpu"
|
|
||||||
|
|
||||||
f = open("%s/extract_f0_feature.log" % exp_dir, "a+")
|
f = open("%s/extract_f0_feature.log" % exp_dir, "a+")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user