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 Permute before attention dense layer in attention_3d_block? #24

Closed
guiyuliu opened this issue Aug 27, 2018 · 2 comments
Closed

why Permute before attention dense layer in attention_3d_block? #24

guiyuliu opened this issue Aug 27, 2018 · 2 comments

Comments

@guiyuliu
Copy link

guiyuliu commented Aug 27, 2018

    a = Permute((2, 1))(inputs)
    a = Dense(TIME_STEPS, activation='softmax')(a)

this line ,why do you permute times_tep and input_dim
what if I don't permute , and followed by a dense layer with input_dim ? since dense layer is with the shape of "time_Step *time_step" ,what is the difference when I change it to "input_dim * input_dim"
Dense(input_Dim activation='softmax')(a)

@Dongzhixiao
Copy link

I think the attention mechanism is used in time step dimension. So the parameters to be trained are the weights to multiply by the time steps.

@philipperemy
Copy link
Owner

The attention block has been updated. It's a much better version than the old one. This issue is now deprecated.

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

3 participants