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)
def beam_search(self, xs, W): xs = self(xs)[0] logp = mx.nd.log_softmax(xs, axis=1) return ctc_beam(logp.asnumpy(), W)