This commit is contained in:
语帆 2024-02-28 15:31:14 +08:00
parent debafeac37
commit 52fee96d71
2 changed files with 1 additions and 4 deletions

View File

@ -141,7 +141,7 @@ class AutoModel:
kwargs = download_model(**kwargs)
set_all_random_seed(kwargs.get("seed", 0))
pdb.set_trace()
device = kwargs.get("device", "cuda")
if not torch.cuda.is_available() or kwargs.get("ngpu", 1) == 0:
device = "cpu"

View File

@ -274,15 +274,12 @@ class LCBNet(nn.Module):
ind: int
"""
with autocast(False):
pdb.set_trace()
# Data augmentation
if self.specaug is not None and self.training:
speech, speech_lengths = self.specaug(speech, speech_lengths)
pdb.set_trace()
# Normalization for feature: e.g. Global-CMVN, Utterance-CMVN
if self.normalize is not None:
speech, speech_lengths = self.normalize(speech, speech_lengths)
pdb.set_trace()
# Forward encoder
# feats: (Batch, Length, Dim)
# -> encoder_out: (Batch, Length2, Dim2)