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

NSC+UPA的模型中,为什么句子层和词汇层得到的user, product表示不同? #16

Closed
Junjieli0704 opened this issue Jul 3, 2017 · 1 comment

Comments

@Junjieli0704
Copy link

在NSC+UPA的模型中,GetuEmbLayer.py里面有下面几行代码来区分是在句子层attention用user还是词汇层attention用user:
if self.name == 'uemb_sentence':
ualloc = T.alloc(u,maxsentencesum,T.shape(u)[0])
uflatten = ualloc.T.flatten()
else:
uflatten = u
self.output = Uemb[uflatten]
我想知道为什么需要分开处理?谢谢!

@Junjieli0704
Copy link
Author

(⊙o⊙)…,突然想通了,已经懂了,谢谢!

@huimchen huimchen closed this as completed Jul 9, 2017
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