示例#1
0
文件: model.py 项目: lzr9926/E2E-ASR
 def beam_search(self, xs, W):
     ''' CTC '''
     xs = self(xs)[0][0]  # only one sequence
     logp = F.log_softmax(xs, dim=1)
     return ctc_beam(logp.data.cpu().numpy(), W)
示例#2
0
 def beam_search(self, xs, W):
     xs = self(xs)[0]
     logp = mx.nd.log_softmax(xs, axis=1)
     return ctc_beam(logp.asnumpy(), W)