-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backward probabilities (\beta) not necessary #1
Comments
I think that's an interesting idea. I had noticed that the loss values ended up being equivalent (or nearly so) at each time step, so only one time step's loss value would be needed. With the current implementation as it is, though, I'm not sure I can completely skip the beta probabilities because I need to calculate the gradients manually since current releases of the autodiff Zygote don't support array mutation. I would certainly be interested in looking at skipping the beta calculations though, since it'd result in fewer instances of index math that I have found tricky to get correct. Perhaps after I get this merged into Flux: FluxML/Flux.jl#1287 |
I was writing my own ctc, and ran into May be I will try avoiding array mutation by allocating \alpha as array of arrays... |
Something that may work is to write a separate function, say, |
Hmmm... I will just do what you are doing. I used to think manual gradients are for 20th century losers, but I see it can come in really handy. 😄 Let me know if you want me to look into anything specific in your code. I had a cute toy example of CTC. You can check it out in the pictures of my python repository. |
I implemented a few versions of CTC in julia. Just did it for fun... |
Namaste @maetshju ,
Great work, Have been waiting for CTC in Julia for a long time. I have written ctc in python a very long time ago, before there were big name packages from Baidu, etc.
After studying it, I realized you do not need to calculate backward probabilities and take a mean.
You can see my implementation here
You just need to take the corner most value in the forward probabilities and that is all.
You could try that and see if you are getting same/similar results.
The text was updated successfully, but these errors were encountered: