Hierarchical Attention Networks for Document Classification阅读笔记

模型结构

<center> </center>

Hierarchical Attention

Word Encoder

Encoder采用的双向GRU

<center> <center> </center> </center>

Word Attention

<center> </center>

这里 <math> <semantics> <mrow> <msub> <mi> u </mi> <mi> w </mi> </msub> </mrow> <annotation encoding="application&#47;x&#45;tex"> u_w </annotation> </semantics> </math>uw作为context vector, 用来衡量原句每个词重要性, 其实是一个随机初始化后需要学习的参数.

Sentence Encoder

<center> </center>

Sentence Attention

<center> </center>

Document Classification

<center> </center> <center> </center>

实验

数据集

  • Yelp reviews
  • IMDB reviews
  • Yahoo answers
  • Amazon reviews

参数

首先, 把文档切分成句子, 并用CoreNLP分词.

  • train: val: test = 80%: 10%: 10%
  • word_embedding: 200
  • GRU dimension: 50(双向之后拼接成100)
  • batch_size: 64
  • optimizer: SGD with momentum(0.9)

实验结果

<center> </center>
全部评论

相关推荐

xtu大迫杰:偶遇校友,祝校友offer打牌
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务