Skip to content
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

Implement ctc loss function #1536

Open
antimora opened this issue Mar 26, 2024 · 3 comments
Open

Implement ctc loss function #1536

antimora opened this issue Mar 26, 2024 · 3 comments
Labels
feature The feature request

Comments

@antimora
Copy link
Collaborator

antimora commented Mar 26, 2024

implement ctc loss function. Can complete: #1049

@antimora antimora changed the title implement ctc loss function Implement ctc loss function Mar 27, 2024
@antimora antimora added the feature The feature request label Mar 27, 2024
@pmalex
Copy link

pmalex commented Dec 27, 2024

Hi! I have a few questions regarding implementation details. Here is the article.

  1. Does we need to manually implement backward pass? As I can see in torch it is manually implemented.
  2. In the original article authors use rescaling mode (additional math operation) due to better numerical stability of results (because probabilities in normal mode become zeros so fast). Should it be used here? Or burn handles numerical stability automatically under the hood?
  3. Is there some standard way to measure performance inside burn? Or should I use criterion and manually implement benchmarks?

@pmalex
Copy link

pmalex commented Jan 21, 2025

@antimora, @laggui ?

@laggui
Copy link
Member

laggui commented Jan 21, 2025

Sorry I was not subscribed to this older issue, didn't get notifications for the first question 😅

  1. This is not usually required for loss functions since they are a combination of tensor ops to compute the result. For now we have tensor ops, activation ops and module ops which can have their own implementation, but no provision for loss functions.
  2. Tricks for better numerical stability are usually at the implementation level (see log sigmoid for example).
  3. We have the burn benchmarks to compare speed between backends, but what you're looking for probably just needs manually measuring the performance (e.g. speed and memory).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature The feature request
Projects
None yet
Development

No branches or pull requests

3 participants