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

你好,对于这个情感分析任务,我有几个疑问。 #3

Open
bbbubblegum opened this issue Mar 10, 2019 · 1 comment
Open

Comments

@bbbubblegum
Copy link

1.我们将一条短评,进行分词,然后将利用预训练的word2vec构建构建这个短评的embeddding,让这个embuding作为LSTM的输入项.而LSTM输入项应该是分词词语的向量才对吧,因为只有词语和词语之间才会有时间序列上的关联,而句子和句子间是没有的。
例如下图中的 x , x , x<t+1> ,应该是词语向量,而不是一个个embedding。
fb9ee87ffc5345babef134df0ab7259
2.如果LSTM输入的是词语向量,而LSTM中每个一LSTM单元的输出层都是二分类的话,是对一个一个词语去判断他的情感极性么?我觉得应该是整个LSTM循环之后再连接一个输出层二分类这样才是合理吧,然后如果是这样的话,我们对每一条短评都建立一个LSTM神经网络模型和二分类的输出层,最后一共m个短评构建出一个LSTM神经网络集群,从而去定义整个集群的损失函数sum(loss)/m么?
很抱歉,我是个初学者,在对LSTM和Word2vec上得理解得不够准确和透彻,希望得到您的解答,谢谢。

Originally posted by @Sujunheng in #2 (comment)

@aespresso
Copy link
Owner

因为一维的独热编码已经可以代表二分类问题, 如果你非要输出两个值, 可以用softmax, 但本质上损失函数计算都是一样的, 都是交叉熵, 可以去看看我最近讲的机器学习中的数学, https://www.bilibili.com/video/av53400966 有讲到分类的问题

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