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

Potential bug in the KeylineEncoder #4

Closed
rpautrat opened this issue Nov 12, 2021 · 2 comments
Closed

Potential bug in the KeylineEncoder #4

rpautrat opened this issue Nov 12, 2021 · 2 comments

Comments

@rpautrat
Copy link

Hi @yosungho,

Thanks for this very nice work and for sharing the code, it is very insightful!

When studying the code, I noticed something weird that might be a bug. It is located in the KeylineEncoder at line:

enc_output, enc_slf_attn = desc_layer(desc, slf_attn_mask=mask)

It seems that the line descriptor is not updated at each iteration, since the output of the desc_layer has a different name than the input (desc vs enc_output). This does not trigger any error from the compiler, but the effect is that only one iteration of desc_layers is effectively used... The previous iterations are just overwritten each time.

Let me know if I got a wrong understanding of this line. Otherwise I think that the correction would be the following:

for desc_layer in self.desc_layers:
   desc, enc_slf_attn = desc_layer(desc, slf_attn_mask=mask)
   enc_slf_attn_list += [enc_slf_attn] if return_attns else []
enc_output = desc
@yosungho
Copy link
Owner

Yes, I think you are right. Thanks for reporting it. I will investigate this issue more next week.

@maengrui
Copy link

an nyeong ha se yo,jeon neun maeng rui im ni da,when im learning the NLP in my projects, i found your paper is a new way in visual detect ,im trying to learn your code ,thank you for your sharing!

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