TextRNN

论文:Recurrent Neural Network for TextClassification with Multi-Task Learning

1 Introduction

DNN缺点:usually need a large-scale corpus due to the large number of parameters,it is hard to train a network that generalizes well with limited data

The first model uses just one shared layer for all the tasks. 

The second model uses different layers for different tasks, but each layer can read information from other layers.

The third model not only assigns one specific layer for each task, but also builds a shared layer for all the tasks.


2 Recurrent Neural Network for Specific-Task Text Classification

2.1 Recurrent Neural Network

缺陷:梯度消失

RNN
The activation of the hidden state ht

LSTM :learning long-term dependencies

LSTM
The LSTM transition equations




论文:A Bi-LSTM-RNNModel for Relation Classification Using Low-Cost Sequence Features

1. Introduction

①performs bi-directional recurrent computation along all the tokens of the sentences which the relation spans. 

②the sequence of token representations, which are generated in the previous step, is divided into five parts according to the order that tokens occur in these sentences,picture1

③standard pooling functions are applied over the token representations of each part and we obtain five representations corresponding to the five parts.

④they are concatenated and fed into a softmaxlayer for relation classification

picture1

LSTMs are used to attenuate the gradientvanishing problem when two target entities aredistant in text.


2. Related Work

3. Our Bi-LSTM-RNN Model

3.1. Long Short Term Memory (LSTM)

equation1

3.2. Bi-LSTM-RNN

Bi-LSTM-RNN


补充:

RNN和LSTM

RNN Tensorflow中的实现

用TensorFlow构建RNN

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容