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

ScaledDotProductAttention doesn't apply C.sqrt? #10

Closed
ghost opened this issue Apr 2, 2020 · 2 comments
Closed

ScaledDotProductAttention doesn't apply C.sqrt? #10

ghost opened this issue Apr 2, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2020

Hello, there

I am very grateful for the cntkx you are developing.

Now I'm trying to use scaled_dot_product_attention, but it doesn't seem like you apply C.sqrt in the follow part, is that a missing or is it not a problem?

dk = C.reduce_sum(C.ones_like(query)) # cannot use sequence.last, will conflict with recurrence

scaled = C.times_transpose(query, broadcasted_key) / dk

@delzac
Copy link
Owner

delzac commented Apr 2, 2020

You are absolutely right! Sorry for the bug, i'll fix it right away and push a new release. Thanks for reporting this issue!

@delzac
Copy link
Owner

delzac commented Apr 2, 2020

Just push out a new build 0.1.33 where the bug is resolved. Please feel free to reopen the issue if there's any other problem!

@delzac delzac closed this as completed Apr 2, 2020
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

1 participant