HawkAaron / warp-transducer

A fast parallel implementation of RNN Transducer.
Apache License 2.0
307 stars 124 forks source link

question about gradient to last blank transition #55

Closed swpd closed 4 years ago

swpd commented 4 years ago

Hi @HawkAaron , according to Eq. (12) from your note, the gradient to last blank transition is: image

However I found the actual implementations different: https://github.com/HawkAaron/warp-transducer/blob/c6d12f9e1562833c2b4e7ad84cb22aa4ba31d18c/include/detail/gpu_rnnt_kernel.h#L161-L165, should it be

if (idx == blank_ && t == T-1 && u == U-1) grad -= exp(alphas[col] + logpk - logll[mb]);

for line 165?

Correct me if I am wrong. Thank you for this great repo.

HawkAaron commented 4 years ago

You are right, thanks very much!