transducer
transducer copied to clipboard
Just questions about the code.
Is there any explanation why you didn't implement this part in C++, and instead did it in Python using torch.autograph.Function?
@staticmethod def backward(ctx, deltas): ...... lngrads = lngrads * expLNs.reciprocal() egrads += expEs * torch.bmm(lngrads, expPs) pgrads += expPs * torch.bmm(lngrads.transpose(1, 2), expEs) egrads = deltas[:, None, None] * egrads pgrads = deltas[:, None, None] * pgrads