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

if-statement on projecting embedding to hidden size #8

Open
cotitan opened this issue Mar 8, 2019 · 1 comment
Open

if-statement on projecting embedding to hidden size #8

cotitan opened this issue Mar 8, 2019 · 1 comment

Comments

@cotitan
Copy link

cotitan commented Mar 8, 2019

I found that in models/UTransformer.py:110&194, you have the following codes:

self.proj_flag = False
if(embedding_size == hidden_size):
    self.embedding_proj = nn.Linear(embedding_size, hidden_size, bias=False)
    self.proj_flag = True

I'm confused that you project embedding to hidden_size when embedding_size==hidden_size, but what if embedding_size!=hidden_size? Doing nothing? Wouldn't it leads to size mismatch?

@andreamad8
Copy link
Owner

Hi,

yes, that's a bug. This weekend I will fix it up. Thanks for letting me know

Best

Andrea

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

2 participants