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

Typo #15

Closed
aksuhton opened this issue Sep 21, 2023 · 2 comments
Closed

Typo #15

aksuhton opened this issue Sep 21, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@aksuhton
Copy link
Contributor

There is a typo in vit.jl where the following function is defined

function (m::MultiHeadAttention)(x::AbstractArray{T, 3}, ps, st) where {T}

More precisely the issue is within, where st_ is defined. I believe we want (minimally)

st_ = (qkv_layer=st_qkv, attention_dropout=st_attention, projection=st_projection)

where I've replaced attention -> attention_dropout. Otherwise Zygote.pullback gets confused when I try to run a training loop.

Apologies if it is taboo to not make a proper PR with mwe and error. Thanks again for all your work.

@avik-pal
Copy link
Member

You are right. it should be as you suggested. Can you open a PR?

@avik-pal avik-pal added the bug Something isn't working label Sep 21, 2023
@aksuhton
Copy link
Contributor Author

Just did over at the following link. This is my first pull request so please feel free to instruct me if I missed something.

#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants