brightmart / text_classification

all kinds of text classification models and more with deep learning
MIT License
7.83k stars 2.57k forks source link

请问p71_TextRCNN_model.py中rnn-cnn layer定义原理是什么?最后ensemble left, embedding, right to output的方式不像Bi-LSTM layer呀 #51

Closed JepsonWong closed 6 years ago

brightmart commented 6 years ago

this is just like taking context information(from left and right) into considering when encode a position to get rich information.


发件人: JepsonWong notifications@github.com 发送时间: 2018年5月8日 10:35 收件人: brightmart/text_classification 抄送: Subscribed 主题: [brightmart/text_classification] 请问p71_TextRCNN_model.py中rnn-cnn layer定义原理是什么?最后ensemble left, embedding, right to output的方式不像Bi-LSTM layer呀 (#51)

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/brightmart/text_classification/issues/51, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASuYMBBs4EfV-B6kxlCdTJQoiUPb648Nks5twQRVgaJpZM4T17Mv.

fei161 commented 6 years ago

The meaning of the paper should be two layers of lstm followed by cnn layer features, why is there no lstm and cnn in your code?

JepsonWong commented 6 years ago

When you get context right, you reverse the input sequences, but you don't reverse the output sequences. I think the output seqences should be reversed. By the way, do you implement a rnn cell by yourself in your source code? So you don't use the tensorflow's api. thanks.@brightmart

JepsonWong commented 6 years ago

I guess the author implement a rnn cell in his source code. https://github.com/brightmart/text_classification/blob/a552e115a54b3d3f0736d418bd1b41a30550815b/a04_TextRCNN/p71_TextRCNN_model.py#L51 this is the rnn weights. @fei161

fei161 commented 6 years ago

The author first makes a full connection to the context. Then concatenates the context vector concat and maximizes it. Finally connects to the full connection layer. @JepsonWong

JepsonWong commented 6 years ago

yes, i know this. I just think that when we get context right, we should reverse the output sequences. @fei161