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

> 可以用PCA降维,参考:https://kexue.fm/archives/8069 #12

Open
DaiJitao opened this issue Apr 26, 2021 · 1 comment
Open

> 可以用PCA降维,参考:https://kexue.fm/archives/8069 #12

DaiJitao opened this issue Apr 26, 2021 · 1 comment

Comments

@DaiJitao
Copy link

可以用PCA降维,参考:https://kexue.fm/archives/8069

好的,我后续试一下这个PCA降维度。
我目前做了一个实验,就是上面截图那样,下载了bert4keras源码,然后新增了一个Dense层,强制把维度修改为300了,然后我在自己的语料上fineturn了一下,计算cos相似度,对同一个句子对,前后对比发现整体cos值变高了

Originally posted by @TestNLP in #11 (comment)

@DaiJitao
Copy link
Author

cos需要输入句子1和句子2的向量吧?才能计算余弦相似度。不明白的地方在于,句子1的向量是直接通过simbert获取的吗?句子2的向量也是通过simbert获取的吗?请问句子1和句子2的向量是如何获取的?

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