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

Why not use cross-entropy loss? #8

Open
TwoWhite2 opened this issue Nov 12, 2021 · 1 comment
Open

Why not use cross-entropy loss? #8

TwoWhite2 opened this issue Nov 12, 2021 · 1 comment

Comments

@TwoWhite2
Copy link

Why not use the cross-entropy loss function but only maximize the probability of a positive category?

@rhythmcao
Copy link
Collaborator

I suppose these two statements are the same.
If you mean why we do not directly use the CrossEntropyLoss API from pytorch for the main text-to-SQL loss, type constaints are incorporated in the decoder, such that the probability for ApplyRule/SelectTable/SelectColumn are softmaxed separately. They can be concatenated together for more efficient implementation, but directly extract the probability of a positive category is ease of use and more readable.

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

No branches or pull requests

2 participants