transducer icon indicating copy to clipboard operation
transducer copied to clipboard

Just questions about the code.

Open lianabagh opened this issue 2 years ago • 0 comments

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

lianabagh avatar Jul 17 '23 20:07 lianabagh