BienBoy
2025-02-05 6ebf6e48eb0368518452312c803c58a65fe9bd26
funasr/models/language_model/rnn/decoders.py
@@ -873,8 +873,10 @@
                        ctc_state[idx], accum_best_ids
                    )
        with torch.cuda.device(vscores.device):
            torch.cuda.empty_cache()
        device = vscores.device
        if device.type == 'cuda':
            with torch.cuda.device():
                torch.cuda.empty_cache()
        dummy_hyps = [{"yseq": [self.sos, self.eos], "score": np.array([-float("inf")])}]
        ended_hyps = [