当前位置:网站首页>【5分钟Paper】Pointer Network指针网络
【5分钟Paper】Pointer Network指针网络
2022-07-26 15:03:00 【小小何先生】
所解决的问题?
提出了一个网络结构,学习输入序列的位置关系。
背景
学习输入序列的位置关系这一类问题可以被看做是seq2seq问题,输出序列长度与输入序列长度一致,并且是一个可变变量。可以用来处理变量排序或者组合优化问题。
这篇文章是2017年发表的,在这之前,对于循环神经网络这一类算法,主要还是基于先验固定了输出的字典,也就是隐藏层输出单元的预测大小并不可知。
所采用的方法?
与之前采用的attention用于编码encoder输入的隐藏状态不同,作者提出的Ptr-Net是基于Attention去选择的。

论文中核心的网络结构就在decoder部分。主要有两点:
- 与以往的
seq2seq模型不同,decoder每一个时刻的输入其实上一个时刻被选中的节点输入信息,是最原始的坐标信息编码之后进入到encoder中的输入信息。 - 在计算
decoder的输出的时候,采用的attention的计算如下:输入是[bs, hidden_dim, seq_len]的context和维度为[bs, hidden_dim]的input。这里的input就是decoder的输入和隐藏层经过LSTM得到的输出。
context经过一个一维度卷积操作,也相当于经过一个权重矩阵 W 1 W_{1} W1得到[bs, hidden_dim, seq_len]维度不变的矩阵。input经过一个权重矩阵 W 2 W_{2} W2再扩展维度到[bs, hidden_dim, seq_len]。之后这两个矩阵相加再与一个[bs, 1, hidden_dim]的可学习的变量 V V V相乘。得到[bs, seq]维度的attention矩阵。对应到原文公式就是:
u j i = v T t a n h ( W 1 e j + W 2 d i ) j ∈ ( 1 , ⋯ n ) u_{j}^{i} = v^{T} tanh(W_{1} e_{j} + W_{2}d_{i} ) \ \ \ j \in (1, \cdots n) uji=vTtanh(W1ej+W2di) j∈(1,⋯n)
过一层softmax得到attention矩阵:
a j i = s o f t m a x ( u j i ) j ∈ ( 1 , ⋯ n ) a_{j}^{i} = softmax(u_{j}^{i}) \ \ \ j \in (1, \cdots n) aji=softmax(uji) j∈(1,⋯n)
这个[bs, seq]维度的attention矩阵再与维度为[bs, hidden_dim, seq_len]的context矩阵相乘得到隐藏层的输出[bs, hidden_dim],作为LSTM的下一个时刻的hidden state。
d i ′ = ∑ j = 1 n a j i e j d_{i}^{\prime} = \sum_{j=1}^{n} a_{j}^{i} e_{j} di′=j=1∑najiej
取得的效果?
所出版信息?作者信息?
参考链接
边栏推荐
- Xiaobai, which securities firm is the best and safest to open an account
- driver开发环境
- Deep Packet Inspection Using Cuckoo Filter论文总结
- FOC电机控制基础
- 基于物联网的环境调节系统(ESP32-C3+Onenet+微信小程序)
- php反序列化部分学习
- Next generation visual transformer: Unlocking the correct combination of CNN and transformer
- Prometheus adds email alarm and enterprise wechat robot alarm
- 数商云:引领化工业态数字升级,看摩贝如何快速打通全场景互融互通
- 装备制造业的变革时代,SCM供应链管理系统如何赋能装备制造企业转型升级
猜你喜欢

Cve-2022-33891 vulnerability recurrence

双屏协作效率翻倍 灵耀X双屏Pro引领双屏科技新潮流

Parallel d-Pipeline: A Cuckoo Hashing Implementation for Increased Throughput论文总结

数商云:引领化工业态数字升级,看摩贝如何快速打通全场景互融互通

Character function and string function and memory function

Vs add settings for author information and time information

晋拓股份上交所上市:市值26亿 张东家族企业色彩浓厚

How to find undergraduate dissertations of domestic universities?

筑牢生态安全防线,广州开展突发环境事件应急演练

OpenGL学习日记2——着色器
随机推荐
Operation method of abbkine elikine human alpha fetoprotein (AFP) ELISA quantitative Kit
How to query foreign literature?
R language uses LM function to build a multiple regression model with interactive terms, and uses step function to build a stepwise regression model to screen the best subset of predictive variables (
益方生物上市首日跌16%:公司市值88亿 高瓴与礼来是股东
In the changing era of equipment manufacturing industry, how can SCM supply chain management system enable equipment manufacturing enterprises to transform and upgrade
R语言可视化散点图、使用ggrepel包的geom_text_repel函数避免数据点之间的标签互相重叠(设置min.segment.length参数为0为每个数据点的标签添加线段)
jetson nano上远程桌面
如何查询外文文献?
Continuous integration (II) introduction to the basic use of Jenkins
Practical purchasing skills, purchasing methods of five bottleneck materials
Ner of NLP: Exploration and practice of product title attribute recognition
Unity URP entry practice
Within a week, I developed my own knowledge sharing platform
大学论文格式怎么写?
QCF for deep packet inspection论文总结
FOC learning notes - coordinate transformation and simulation verification
持续集成(二)Jenkins基本使用介绍
Solve the problem that typora pictures cannot be displayed
The practice of software R & D should start from the design
How to get 5L water in a full 10L container, 7L or 4L empty container