Git Product home page Git Product logo

Comments (20)

terrifyzhao avatar terrifyzhao commented on August 9, 2024

@27232xsl 你可以在你的模型输入层添加一个全连接层进行降维

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@好像有点难度,我尝试一下吧,谢谢你,先不要close掉我的问题哦,我可能要回来接着问的,谢谢你哈

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

我还有两个问题想请教一下 1.我要是用英文语料来训练并且只得到句向量的话,是否可以直接用你的程序不需要任何修改 2.我有一段文本(有好几句话)是来描述一个命名实体的,现在想得到这段文本的段向量,是否只能先得到句向量再进行相加呢?有别的思路吗?(灰常谢谢你!!!)

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 请问你做了降维吗?我也不会

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@Biaocsu 我根据下游任务做了降维,但是和这个bert算法没有关系的,让bert的768维向量乘以个768*100维的矩阵,自己设了目标函数不断训练这个矩阵,最后会得到矩阵,然后再相乘就可以降维了

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 好独特的思路,不错不错。另外可以将这个思路的代码贴一下吗?哈哈哈,谢谢

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

这部分的代码实现很简单的,但是我的下游任务有点复杂,代码灰常灰常灰常长,贴不上来,你可以也这样试一下的,,,祝你成功哈哈哈哈

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 嗯嗯,好的,哈哈哈

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 另外我有个疑问,这个768*100的矩阵在下游任务上即使是最优结果,但是怎么解释它也是与bert词向量相乘的最好矩阵呢?

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

判断是不是最好矩阵难道不是通过在下游任务的最终效果看出来的吗,在下游任务中表现不错就可以说明这是个好矩阵啊。。。对吧

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 我感觉有点不对劲哦!因为如果我下游任务换个目标函数,完全可以得到一个区别很大的768*100矩阵,所以这个矩阵好像很难解释好坏

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@Biaocsu 对啊,矩阵可以换的啊,评价这个矩阵好不好和评价这个768维的向量好不好是一样的啊,下游任务效果好,比如说我分类分的很清楚,这个向量就不错啊,,,不是吗,我觉得很对劲啊~~~~哈哈哈哈虽然我的下游任务效果并不好!!!!

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 或者说,我如果想利用降维后的词向量做其他下游任务感觉就不行了,因为目标函数都不一样了,反正总感觉有问题

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

因为我可以随便设定一个768*100的矩阵(这个矩阵一定可以是某个目标函数的最优解)

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

@27232xsl 我在网上搜词向量降维技术,也没搜到这种办法应该是有原因的吧,目前比较可靠的好像是利用PCA

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@Biaocsu 我知道你指的是哪里不对劲,我也思考过,你是觉得这个最终100维的向量怎么能调来调去呢,可是正常情况应该就是随着下游任务调的,哪有那么多通用的还适合各种下游任务的向量,比如有一条鱼,有的人喜欢煎的,有的人喜欢煮的,有的人喜欢炖的,鱼就是768维向量,个人喜好就是100维向量,煎煮炖等做法就是矩阵,难道这个人吃什么不是应该根据个人喜好决定鱼的做法吗?

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

哈哈哈,我竟无法反驳。不过我还是通过全连接层降维吧。如果你最终这个词向量用在任务上效果表现很好,麻烦告知一声哈

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@Biaocsu 好吧,不过我好菜的,也不用听我的,效果好了我就告诉你

from bert-utils.

Biaocsu avatar Biaocsu commented on August 9, 2024

都是摸索着不断成长,加油

from bert-utils.

27232xsl avatar 27232xsl commented on August 9, 2024

@Biaocsu 嗯嗯

from bert-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.