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

Question About Predefined Concept Module #8

Closed
jionie opened this issue Jan 5, 2022 · 0 comments
Closed

Question About Predefined Concept Module #8

jionie opened this issue Jan 5, 2022 · 0 comments

Comments

@jionie
Copy link

jionie commented Jan 5, 2022

Hi, thanks for sharing this great work! I'm a little bit confusing about line 97 to line 101, why calculate hidden twice? What's the purpose of this part? Thanks!

95  hidden = torch.t(stock_to_concept).mm(x_hidden)

97  hidden = hidden[hidden.sum(1)!=0]
98  stock_to_concept = x_hidden.mm(torch.t(hidden))
99  # stock_to_concept = cal_cos_similarity(x_hidden, hidden)
100 stock_to_concept = self.softmax_s2t(stock_to_concept)
101 hidden = torch.t(stock_to_concept).mm(x_hidden)

103 concept_to_stock = cal_cos_similarity(x_hidden, hidden) 
@jionie jionie closed this as completed Jan 5, 2022
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

1 participant