At the beginning of this year, I’ve spent a lot of time learning about handwriting and speech recognition, but there wasn’t any out-of-the-box solution in TFJS since most of the solutions rely on the CTC loss calculation algorithm. I’ve found this in the issue list: https://github.com/tensorflow/tfjs/issues/1759 and also some hints that “it would be good to have it in TFJS”.
Since I had time, I prepared a naive implementation of the original paper, which currently fits into the TFJS ecosystem - I mean, it’s callable, it runs one sample ok, it handles batches as well, fits into the layered models’s call hierarchy, and calculates the loss and the gradient so that model.fit() would work.
I’m struggling with the tests. The obvious ones (prediction and the label is the same so it returns the expected zero gradient) are there, but there aren’t any I could find in the Python implementation. So if somebody could help me out with that, I’d be really grateful.
Also, I’m planning to donate the code to the TFJS project, but wouldn’t want to commit faulty code.