游雁
2024-03-18 d3d2fe73c08ee51d3a44d7ffb7b31eff32b60404
wav fronend
2个文件已修改
4 ■■■ 已修改文件
funasr/frontends/wav_frontend.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/train_utils/trainer.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/frontends/wav_frontend.py
@@ -75,6 +75,7 @@
    LFR_outputs = torch.vstack(LFR_inputs)
    return LFR_outputs.type(torch.float32)
@tables.register("frontend_classes", "wav_frontend")
@tables.register("frontend_classes", "WavFrontend")
class WavFrontend(nn.Module):
    """Conventional frontend structure for ASR.
funasr/train_utils/trainer.py
@@ -146,7 +146,7 @@
        """
        ckpt = os.path.join(resume_path, "model.pt")
        if os.path.isfile(ckpt):
            checkpoint = torch.load(ckpt)
            checkpoint = torch.load(ckpt, map_location="cpu")
            self.start_epoch = checkpoint['epoch'] + 1
            # self.model.load_state_dict(checkpoint['state_dict'])
            src_state = checkpoint['state_dict']
@@ -170,6 +170,7 @@
        else:
            print(f"No checkpoint found at '{ckpt}', does not resume status!")
        self.model.to(self.device)
        if self.use_ddp or self.use_fsdp:
            dist.barrier()