show-attend-and-tell icon indicating copy to clipboard operation
show-attend-and-tell copied to clipboard

problems with function _project_features

Open lcuyh opened this issue 6 years ago • 3 comments

Hi! Thank you for sharing your code! I have some questions about your coding. The shape of the input of the function _project_features is (N, L, D), and the output of this function is the same shape of the input. So, why you need to have this function? What the purpose of this function?

lcuyh avatar Jun 01 '18 03:06 lcuyh

hi, i have the same question, have you figured out? i found project_features was added to attention extracted from hidden state (see function _attention_layer) @lcuyh @yunjey

yxding95 avatar Jun 09 '18 08:06 yxding95

hi, I've got the same problem. Why would the author project the features of images before feeding them into attention layer?

zx3Leonoardo avatar Sep 10 '18 02:09 zx3Leonoardo

i think the project_features is transforming feature dim to the dim of hidden state, which was used in attention layer. The dim of VGG conv5_3 is the same with h_dim, but if we change another feature, maybe we have to use project feature

yxding95 avatar Sep 10 '18 03:09 yxding95