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

a #5

Open
wants to merge 490 commits into
base: master
Choose a base branch
from
Open

a #5

Changes from 1 commit
Commits
Show all changes
490 commits
Select commit Hold shift + click to select a range
35bacaf
【add】my_tensorflow
imhuay Aug 12, 2018
a0f4957
结构调整
imhuay Aug 12, 2018
a419b69
结构调整
imhuay Aug 12, 2018
50048a4
结构调整
imhuay Aug 12, 2018
6bdde58
update
imhuay Aug 12, 2018
d72de44
【update】编辑距离
imhuay Aug 12, 2018
2a7d73d
update
imhuay Aug 13, 2018
412517b
【add】highway_dense-layer
imhuay Aug 13, 2018
08c1d35
结构调整
imhuay Aug 13, 2018
b30c7fe
update
imhuay Aug 13, 2018
35e1ece
【update】失效链接
imhuay Aug 13, 2018
0c19a00
update
imhuay Aug 13, 2018
e0931af
update
imhuay Aug 13, 2018
1cd3885
【update】不通过继承实现多态
imhuay Aug 13, 2018
07651ff
【add】倒排索引
imhuay Aug 13, 2018
07df6ff
update
imhuay Aug 13, 2018
1fbf637
【add】highway_conv2d-layer
imhuay Aug 13, 2018
a2ef999
update
imhuay Aug 14, 2018
3bd604c
【add】multi-highway-conv2d
imhuay Aug 14, 2018
db7ff5b
【add】备忘-Markdown小技巧
imhuay Aug 14, 2018
6daeb9b
【add】最长公共子序列
imhuay Aug 14, 2018
0fa2dd0
【add】attention for dense and rnn
imhuay Aug 14, 2018
46bc644
【add】attention_flow匹配层
imhuay Aug 14, 2018
59705c1
【add】动态规划-最长递增/上升子序列(LIS)
imhuay Aug 15, 2018
67e3b18
【update】动态规划-最长递增/上升子序列(LIS)
imhuay Aug 15, 2018
1732058
【update】动态规划-最长递增/上升子序列(LIS)
imhuay Aug 15, 2018
caaee9f
【update】动态规划-最长递增/上升子序列(LIS)
imhuay Aug 15, 2018
a84917e
【update】attention_flow匹配层
imhuay Aug 15, 2018
80fd801
【add】备忘-IPython小技巧
imhuay Aug 15, 2018
24bb92f
【update】attention_flow匹配层
imhuay Aug 15, 2018
7cee51c
【add】DP-最长回文子串/子序列
imhuay Aug 15, 2018
a08c411
【add】different ReLU
imhuay Aug 15, 2018
d6f90cd
【update】different ReLU
imhuay Aug 16, 2018
d3870a3
【add】最长公共字串
imhuay Aug 16, 2018
fe6f3ce
update
imhuay Aug 16, 2018
7681f2c
【update】动态规划
imhuay Aug 16, 2018
34f84cf
【update】DP-最长公共字串
imhuay Aug 16, 2018
bf1336f
【add】语义匹配模型
imhuay Aug 16, 2018
c9cb2d9
【add】专题-洗牌与采样算法
imhuay Aug 17, 2018
e596feb
【update】洗牌与采样
imhuay Aug 17, 2018
d8cb395
【update】洗牌与采样
imhuay Aug 17, 2018
9844a4a
update
imhuay Aug 17, 2018
3bb23b4
【update】移除IPython备忘,添加Python工具备忘
imhuay Aug 17, 2018
7315f26
【update】Python工具
imhuay Aug 17, 2018
95a7a19
【update】洗牌与采样
imhuay Aug 17, 2018
4c766e0
update
imhuay Aug 17, 2018
20d55ac
update
imhuay Aug 17, 2018
ac0750e
【update】偏差与方差
imhuay Aug 17, 2018
b08afe9
【update】生成模型与判别模型
imhuay Aug 17, 2018
38f9b7d
【update】生成模型与判别模型
imhuay Aug 17, 2018
cd9c3b2
【update】结构调整
imhuay Aug 18, 2018
1eb1e9b
update
imhuay Aug 18, 2018
98c576a
update
imhuay Aug 18, 2018
7286643
【update】LeetCode
imhuay Aug 19, 2018
da52387
【update】带权采样(有放回)
imhuay Aug 19, 2018
684644b
【update】带权采样(有放回)
imhuay Aug 19, 2018
542dbae
【add】DL-专题-优化算法
imhuay Aug 19, 2018
d83ea7a
【update】README
imhuay Aug 19, 2018
97e8256
Fix binary search bug (#9)
pjpjq Aug 19, 2018
9cea3e4
【fix】11. 旋转数组的最小数字
imhuay Aug 19, 2018
75af884
【update】DL-专题-优化算法
imhuay Aug 20, 2018
719075a
【add】阅读理解相关论文
imhuay Aug 20, 2018
24aeb63
【add】proj-完形填空
imhuay Aug 21, 2018
f202cf5
【update】双指针
imhuay Aug 21, 2018
16de6cb
【add】鹰蛋问题
imhuay Aug 21, 2018
eb7f8dc
【update】attention_flow 匹配层
imhuay Aug 21, 2018
b3d3b15
【update】DL-优化算法
imhuay Aug 21, 2018
428f36e
update
imhuay Aug 21, 2018
509116b
【update】完形填空-改进三
imhuay Aug 22, 2018
e22d110
【update】LeetCode题解
imhuay Aug 22, 2018
47412f9
【update】字节跳动812笔试
imhuay Aug 22, 2018
cd7bf98
【update】结构调整
imhuay Aug 22, 2018
1907114
【update】结构调整
imhuay Aug 22, 2018
9f27a5e
【update】随机数生成
imhuay Aug 22, 2018
18f9347
【update】DP-背包问题:01背包、完全背包
imhuay Aug 23, 2018
9849b5d
【update】2018-8-23
imhuay Aug 23, 2018
7e597b0
【update】CNN的内部实现、反向传播
imhuay Aug 24, 2018
1a8afc7
update
imhuay Aug 24, 2018
d2d0aad
【update】卷积的内部实现(Theano)
imhuay Aug 24, 2018
bb0f492
【update】词向量相关论文
imhuay Aug 24, 2018
b7aab8c
【update】重命名
imhuay Aug 25, 2018
72cf80d
【update】梯度下降及其改进(修订)
imhuay Aug 26, 2018
6a064c3
【update】深度学习中的优化算法(修订)
imhuay Aug 26, 2018
411009b
【add】K-Means
imhuay Aug 27, 2018
8a83c4f
【add】笔试-360-180827
imhuay Aug 27, 2018
d459c22
【update】360-第三题思路
imhuay Aug 27, 2018
9fbe39a
【update】K-Means完善注释
imhuay Aug 28, 2018
39f913e
【update】2018-8-27
imhuay Aug 28, 2018
2b2b5a4
【update】DL-专题-RNN
imhuay Aug 28, 2018
34e988d
【update】随机数-用rand_m()生成rand_n()
imhuay Aug 28, 2018
2370854
【update】DL-专题-CNN
imhuay Aug 28, 2018
ab59d9d
结构调整
imhuay Aug 28, 2018
714e580
【update】DL专题-RNN
imhuay Aug 29, 2018
213605c
【update】笔试-360-180827
imhuay Aug 29, 2018
d254027
结构调整
imhuay Aug 29, 2018
984ce67
结构调整
imhuay Aug 29, 2018
026987a
结构调整
imhuay Aug 29, 2018
768be8f
【update】RNN专题-RNN的3种设计模式
imhuay Aug 29, 2018
47c0ae7
【update】RNN的基本结构
imhuay Aug 29, 2018
6e4825a
【update】专题-Seq2Seq
imhuay Aug 29, 2018
3fdcceb
update
imhuay Aug 30, 2018
044a3cf
update
imhuay Aug 30, 2018
bd2437d
update
imhuay Aug 30, 2018
053ba84
【add】笔试-招行-180830
imhuay Aug 30, 2018
c366c3b
update
imhuay Aug 30, 2018
8a436af
update
imhuay Aug 30, 2018
ca6bcef
【add】DL基础-批归一化
imhuay Aug 31, 2018
9b445b1
update
imhuay Aug 31, 2018
3929403
【add】DP-最大正方形
imhuay Aug 31, 2018
07bed98
update
imhuay Aug 31, 2018
3555729
update
imhuay Sep 3, 2018
1fab512
update
imhuay Sep 3, 2018
607f335
fix #11 Lp范数公式
imhuay Sep 4, 2018
92d67db
update
imhuay Sep 4, 2018
9fcc097
update
imhuay Sep 4, 2018
6a06b0b
update
imhuay Sep 4, 2018
1774489
update
imhuay Sep 4, 2018
bce4555
update
imhuay Sep 4, 2018
a4decd6
【update】排列
imhuay Sep 4, 2018
d387940
【update】排列组合-第k个排列
imhuay Sep 5, 2018
8123178
【update】排列组合问题
imhuay Sep 5, 2018
b3fe7fb
结构调整
imhuay Sep 8, 2018
86f5326
结构调整
imhuay Sep 8, 2018
ae9e6d9
结构调整
imhuay Sep 8, 2018
e91746c
笔试-快手-180910
imhuay Sep 10, 2018
455028a
【update】快手第三题
imhuay Sep 10, 2018
e5b624c
【update】VQA综述
imhuay Sep 11, 2018
0df3ab3
【update】笔试-快手-180910-第三题
imhuay Sep 11, 2018
08e260b
【update】VQA综述
imhuay Sep 11, 2018
928c6cb
结构调整
imhuay Sep 12, 2018
152c933
结构调整
imhuay Sep 12, 2018
065ef9f
结构调整
imhuay Sep 12, 2018
9079c50
结构调整
imhuay Sep 12, 2018
e6ccbf5
【add】笔试-迅雷-180912
imhuay Sep 12, 2018
8f80df6
【add】笔试-百度-180911
imhuay Sep 12, 2018
01827ec
结构调整
imhuay Sep 12, 2018
b71abc5
【update】VQA综述
imhuay Sep 12, 2018
14fdcaf
【add】笔试-度小满-180913
imhuay Sep 13, 2018
8ccc7d1
结构调整
imhuay Sep 13, 2018
e5a95fd
【update】笔试-度小满-180913
imhuay Sep 13, 2018
8caa0c1
结构调整
imhuay Sep 13, 2018
bcfc1d8
结构调整
imhuay Sep 13, 2018
33e8a09
【add】算法-区间问题
imhuay Sep 13, 2018
5d008ab
结构调整
imhuay Sep 13, 2018
50a938a
结构调整
imhuay Sep 13, 2018
3f299ab
结构调整
imhuay Sep 13, 2018
0c8ef2b
结构调整
imhuay Sep 13, 2018
2d8912e
结构调整
imhuay Sep 13, 2018
fb4e861
结构调整
imhuay Sep 13, 2018
7613985
【add】专题-句向量
imhuay Sep 14, 2018
b6ef2d5
【add】笔试-百度-180914
imhuay Sep 14, 2018
69afb69
结构调整
imhuay Sep 15, 2018
f341572
【add】笔试-爱奇艺-180915
imhuay Sep 15, 2018
c6d596d
结构调整
imhuay Sep 15, 2018
5d74dbb
【update】专题-Sentence Embedding
imhuay Sep 15, 2018
5336720
【add】笔试-搜狐畅游-180915
imhuay Sep 15, 2018
1de5603
【update】专题-句向量
imhuay Sep 15, 2018
cd8949f
【add】笔试-腾讯-180916
imhuay Sep 16, 2018
30cb668
【update】笔试-腾讯-180916
imhuay Sep 16, 2018
2ec9aca
结构调整
imhuay Sep 16, 2018
c97229d
结构调整
imhuay Sep 16, 2018
6b6e70a
【update】笔试-腾讯-180916
imhuay Sep 16, 2018
7ee3d05
结构调整
imhuay Sep 16, 2018
d35ac93
【add】计算机视觉
imhuay Sep 17, 2018
865708d
【add】笔试-顺丰-180917
imhuay Sep 17, 2018
7719bda
【add】二维数组的二分查找
imhuay Sep 17, 2018
4e334cc
【add】笔试-滴滴-180918
imhuay Sep 18, 2018
21f930b
【update】动态规划-硬币问题
imhuay Sep 18, 2018
7f5cdb1
【update】笔试-滴滴-180918
imhuay Sep 18, 2018
5ae0701
【update】数据结构-二叉树的宽度
imhuay Sep 20, 2018
a201099
【add】Python中的垃圾回收机制
imhuay Sep 20, 2018
fb40972
结构调整
imhuay Sep 20, 2018
fb06238
结构调整
imhuay Sep 20, 2018
f5fb10a
【add】笔试-小米-180920
imhuay Sep 20, 2018
5c22019
【update】笔试-小米-180920(#12)
imhuay Sep 20, 2018
49e7742
【add】专题-双指针
imhuay Sep 21, 2018
95295e5
update
imhuay Sep 21, 2018
e2f0c37
【update】专题-双指针
imhuay Sep 21, 2018
f5e8fd1
【update】专题-双指针
imhuay Sep 23, 2018
82274e2
结构调整
imhuay Sep 24, 2018
9a9d91d
结构调整
imhuay Sep 24, 2018
cc15c1b
结构调整
imhuay Sep 24, 2018
26bca01
结构调整
imhuay Sep 24, 2018
20eaf96
结构调整
imhuay Sep 24, 2018
a3bba74
结构调整
imhuay Sep 24, 2018
0c9535f
结构调整
imhuay Sep 24, 2018
41e5332
update
imhuay Sep 24, 2018
6869776
update
imhuay Sep 24, 2018
20dd08a
【update】专题-双指针
imhuay Sep 24, 2018
45b6c76
update
imhuay Sep 25, 2018
2492f6b
update
imhuay Sep 25, 2018
4305860
【update】数据结构-LRU缓存
imhuay Sep 25, 2018
24ece44
update
imhuay Sep 25, 2018
517b3df
【update】专题-RNN
imhuay Sep 25, 2018
61d89cd
update
imhuay Sep 25, 2018
b569b0c
update
imhuay Sep 25, 2018
921ba21
update
imhuay Sep 25, 2018
0dc5d67
【add】笔试-作业帮-180925
imhuay Sep 25, 2018
3cccd79
【update】专题-双指针
imhuay Sep 25, 2018
821e62d
【update】专题-双指针
imhuay Sep 26, 2018
b10353b
【update】笔试-作业帮-180925
imhuay Sep 26, 2018
7b67776
【update】专题-双指针
imhuay Sep 26, 2018
9140e68
【add】笔试-iHandy-180927
imhuay Sep 27, 2018
cc806da
【update】笔试-iHandy-180927
imhuay Sep 27, 2018
b368802
【update】专题-双指针
imhuay Sep 27, 2018
f7a2e82
【update】专题-双指针(图示模板)
imhuay Sep 28, 2018
2903f10
update
imhuay Sep 28, 2018
4412e5a
【update】专题-双指针
imhuay Sep 28, 2018
b72aa02
Please merge to fix the wrong integral expression. (#16)
GinRyan Sep 29, 2018
d037bff
【update】链表快排
imhuay Sep 29, 2018
6d2057d
【update】链表排序
imhuay Sep 29, 2018
f44f883
【update】链表排序
imhuay Sep 29, 2018
c650b64
【update】链表排序
imhuay Sep 30, 2018
bf12765
update
imhuay Sep 30, 2018
4450e66
update
imhuay Oct 1, 2018
cd82c2e
update
imhuay Oct 1, 2018
8d24b3a
【add】概率
imhuay Oct 1, 2018
9877a66
feat: add OI Wiki (#18)
Ir1d Oct 6, 2018
08a2c0f
4.第四题区间最大最小值ljj个人解题思路 (#23)
Oct 12, 2018
97b5592
update
imhuay Oct 17, 2018
e2f8076
fix #25
imhuay Oct 18, 2018
5dd66d0
fix #25
imhuay Oct 18, 2018
1e59255
update
imhuay Oct 18, 2018
c25bc57
update
imhuay Oct 18, 2018
0a4e92e
update
imhuay Oct 18, 2018
8e7f23f
update
imhuay Oct 20, 2018
a65f96d
update
imhuay Oct 20, 2018
64efd5c
Update B-自然语言处理/D-视觉问答-1_综述.md
imhuay Oct 20, 2018
5a8c0d1
Update B-自然语言处理/B-专题-句向量.md
imhuay Oct 20, 2018
d40ddd8
Update B-自然语言处理/B-专题-句嵌入.md
imhuay Oct 20, 2018
d5215b3
Update C-算法/专题-A-字符串.md
imhuay Oct 20, 2018
3948053
Update C-算法/专题-B-双指针.md
imhuay Oct 20, 2018
7cb8a72
Update B-自然语言处理/B-专题-词向量.md
imhuay Oct 20, 2018
097e5cc
Update B-自然语言处理/D-视觉问答-1_综述.md
imhuay Oct 20, 2018
46fa4ea
Update 笔试-迅雷-180912.md (#26)
FIREKUN Nov 1, 2018
63c1fe1
Update 专题-A-数据结构.md (#29)
zhendonghu Nov 7, 2018
b062357
Update
imhuay Feb 12, 2019
3c2b3cc
Add DQU
imhuay Feb 13, 2019
e3905e9
Add NLP趋势
imhuay Feb 13, 2019
b9245a2
Update
imhuay Feb 13, 2019
4b7e80a
Update A-综述.md
imhuay Feb 13, 2019
36e3862
Update A-综述.md
imhuay Feb 15, 2019
278ce70
Update A-机器学习实践.md (#35)
jeffery-ljf Feb 25, 2019
fff1b87
Update README.md
imhuay Feb 25, 2019
f75a43c
Update README.md
imhuay Feb 25, 2019
62f58c3
Update A-NLP发展趋势.md
imhuay Feb 28, 2019
ba8fef0
Update A-机器学习实践.md (#47)
Mar 25, 2019
edbaa97
Merge pull request #1 from imhuay/master
LuoZhenzi Mar 28, 2019
a274dce
Create 模型压缩.md
imhuay Apr 7, 2019
9c3f810
Merge pull request #2 from imhuay/master
LuoZhenzi Apr 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
结构调整
imhuay committed Sep 13, 2018
commit 8ccc7d15852974186a18a3fe70c9a1b1e1003cfd
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ Index
>> 实例分割:[14]、[15]、[16]

**标签歧义**
<div align="center"><img src="../../assets/TIM截图20180908212911.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180908212911.png" height="" /></div>

> 【图1】目标检测 和 语义分割
- **语义分割**或**实例分割**都不足以全面理解整个场景;
@@ -123,7 +123,7 @@ Index
#### DenseCap
- DenseCap 全称为 Dense image captioning,它在一定程度上缓解了普适标题的问题;
- DenseCap 会在图像的不同局部位置生成密集的注释;
<div align="center"><img src="../../assets/TIM截图20180908224213.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180908224213.png" height="" /></div>

- 即使如此,这些短描述也存在自动评价的问题;
- 此外,这些只针对局部信息的描述也不能提供空间信息或对象关系。
@@ -189,16 +189,16 @@ Index

**COCO-VQA 的问题**
- 由于语言上的偏见,许多问题**无需使用图像**就能回答;
<div align="center"><img src="../../assets/TIM截图20180909132343.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180909132343.png" height="" /></div>

- Q: "What color are the trees?" —— A: "green."
- 在数据集中,这个问题出现了 73 次,其中 70 个的答案都是 "green"
- 存在许多主观问题,没有准确的答案;
<div align="center"><img src="../../assets/TIM截图20180909132723.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180909132723.png" height="" /></div>

- Q: "Would you like to fly in that?" —— A: "yes"(4), "No"(6)
- 许多问题需要解释或冗长的描述,这类问题难以自动评价;
<div align="center"><img src="../../assets/TIM截图20180909133015.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180909133015.png" height="" /></div>

- Q: "Why would you say this woman is strong?" —— A: "yes"(5), can lift up on arms, headstand, handstand, can stand on her head, she is standing upside down on stool.

@@ -215,7 +215,7 @@ Index
- 包含两种模式:
- **free-form method**:可以针对图像提出任意问题;人类标注者通常会趋向于提出类似的问题。
- **regionspecific method**:针对图像的指定区域提问;
<div align="center"><img src="../../assets/TIM截图20180909161143.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180909161143.png" height="" /></div>

- Free form QA: What does the sky look like?
- Region based QA: What color is the horse?
@@ -230,7 +230,7 @@ Index
- 两类问题
- ‘telling’ questions:答案是基于文本的
- ‘pointing’ questions:以 Which 开头的问题,对于这些问题,算法必须在备选方案中选择正确的边界框。
<div align="center"><img src="../../assets/TIM截图20180909161708.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180909161708.png" height="" /></div>

- Q: Which object can you stab food with?

@@ -286,7 +286,7 @@ Index

- **基于分类的基本框架**
- **基于分类的 VQA 基本框架**
<div align="center"><img src="../../assets/TIM截图20180910135921.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180910135921.png" height="" /></div>

- 不同做法的差异主要体现在**如何整合图像和文本的特征**
- **整合图像和问题特征的方法**
@@ -323,7 +323,7 @@ Index
**[40]**
- LSTM + GoogleNet;
- 本文将图像特征拼接到问题的每个词之后,共同作为 LSTM 的输入;问题结束后的时间步被用于生成答案。
<div align="center"><img src="../../assets/TIM截图20180910220336.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180910220336.png" height="" /></div>

**[33]**
- Seq2Seq 生成模型,本文采用的是 Encoder-Decoder 框架
@@ -342,7 +342,7 @@ Index
- 本文基于这样一个直觉(insight),通过问题可以预测**答案的类型**。
- 基于此,将开放性问题转化为多选择问题;
- skip-thought vectors + ResNet-152
<div align="center"><img src="../../assets/TIM截图20180911151229.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911151229.png" height="" /></div>

## 基于 Attention 的模型
> 相关论文: [63, 49, 52, 48, 54, 51, 46, 55]
@@ -358,7 +358,7 @@ Index
- 一种是类似语义分割的方式,生成**边缘框**(Edge Boxes [68]),对每个框生成特征
- 一种是使用**均匀网格**(**Uniform Grid**)把图像分成若干区域,然后利用 CNN 生成每个网格区域的图像特征,然后计算每个区域与问题中每个词的相关度得到 Attention 权重矩阵。
> 这个过程实际上跟**卷积**本身很像。
<div align="center"><img src="../../assets/TIM截图20180911153132.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911153132.png" height="" /></div>

**Attention 的作用**

@@ -369,7 +369,7 @@ Index
- 模型输入:所有 box 区域的 CNN 特征、问题特征、答案
- 模型对每个候选答案生成一个分数,经过**排序**后得到最终答案
- 打分部分由一个全连接层完成。
<div align="center"><img src="../../assets/TIM截图20180911164443.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911164443.png" height="" /></div>

**[51]** A focused dynamic attention model for visual question answering(FDA)
- 模型建议只使用与问题相关的 box 区域。
@@ -380,7 +380,7 @@ Index
- 然后使用 Word2Vec 计算问题中的单词与对象标签之间的相似度。
- 只要相似度大于 0.5 则认为是相关的。
- 问题和图像序列分别使用 LSTM 建模,得到特征后送入全连接层分类得到答案。
<div align="center"><img src="../../assets/TIM截图20180911163940.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911163940.png" height="" /></div>

- 在最后一个时间步,模型还输入了图像的全局特征,用于访问全局以及局部特征。

@@ -390,12 +390,12 @@ Index
#### [49] Stacked Attention Networks for Image Question Answering(SAN)
- 模型提取 VGG19 最后一个 Pooling 层的 feature map 作为区域特征,其大小为 `14*14*512`。
- 相当于把原始 `448*448` 的图像均匀划分为 `14*14` 个网格(grid),每个网格使用一个 `512` 维的向量表示其特征。
<div align="center"><img src="../../assets/TIM截图20180911174700.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911174700.png" height="" /></div>

- **Attention 层**
- Attention 层的主要作用是计算每个网格与问题的相关度
- 公式:
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_cs&space;\begin{aligned}&space;h_A&=\tanh(W_I\cdot&space;v_I\oplus(W_Q\cdot&space;v_Q&plus;b_Q))\\&space;p_I&=\text{softmax}(W_p\cdot&space;h_A&plus;b_p)&space;\end{aligned}"><img src="../../assets/公式_20180911215014.png" height="" /></a></div>
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_cs&space;\begin{aligned}&space;h_A&=\tanh(W_I\cdot&space;v_I\oplus(W_Q\cdot&space;v_Q&plus;b_Q))\\&space;p_I&=\text{softmax}(W_p\cdot&space;h_A&plus;b_p)&space;\end{aligned}"><img src="../assets/公式_20180911215014.png" height="" /></a></div>

> 其中 `vI: [14*14,512]` 为图像特征,`vQ: [512]` 为问题特征;最后 `pI: [14*14]` 即问题在每个网格处的关注度

@@ -420,14 +420,14 @@ Index
- 在得到每个网格与问题的相关度后,对所有网格进行加权求和,从而得到整个图像加权后的全局特征;
- 整合图像特征与问题特征后进行分类(本文采用整合方法为按位求和)

<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;\begin{aligned}&space;\tilde{v}_I&=\sum_{i=1}^m&space;p_iv_i\\&space;u&=\tilde{v}_I&plus;v_Q&space;\end{aligned}"><img src="../../assets/公式_20180911224527.png" height="" /></a></div>
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;\begin{aligned}&space;\tilde{v}_I&=\sum_{i=1}^m&space;p_iv_i\\&space;u&=\tilde{v}_I&plus;v_Q&space;\end{aligned}"><img src="../assets/公式_20180911224527.png" height="" /></a></div>

**Stacked Attention**(堆叠 Attention)
- 对于复杂的问题,**单一的 Attention 层并不足以定位正确的答案预测区域**。
<div align="center"><img src="../../assets/TIM截图20180911222910.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180911222910.png" height="" /></div>

- 本文使用多个 Attention 层迭代上述过程
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;\begin{aligned}&space;\text{set}\quad&space;{\color{Red}u^{(0)}}&=v_Q,\quad&space;k=1,2,...,K\\&space;\text{then}\quad&space;h^{(k)}&=\tanh(W_I^{(k)}\cdot&space;{\color{Red}v_I}\oplus(W_Q^{(k)}\cdot{\color{Red}u^{(k-1)}}&plus;b_Q^{(k)}))\\&space;p^{(k)}&=\text{softmax}(W_p^{(k)}\cdot&space;h^{(k)}&plus;b_p^{(k)})\\&space;\tilde{v}_I^{(k)}&=\sum_{i=1}^m&space;p_i^{(k)}v_i\\&space;{\color{Red}u^{(k)}}&=\tilde{v}_I^{(k)}&plus;u^{(k-1)}&space;\end{aligned}"><img src="../../assets/公式_20180911225643.png" height="" /></a></div>
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;\begin{aligned}&space;\text{set}\quad&space;{\color{Red}u^{(0)}}&=v_Q,\quad&space;k=1,2,...,K\\&space;\text{then}\quad&space;h^{(k)}&=\tanh(W_I^{(k)}\cdot&space;{\color{Red}v_I}\oplus(W_Q^{(k)}\cdot{\color{Red}u^{(k-1)}}&plus;b_Q^{(k)}))\\&space;p^{(k)}&=\text{softmax}(W_p^{(k)}\cdot&space;h^{(k)}&plus;b_p^{(k)})\\&space;\tilde{v}_I^{(k)}&=\sum_{i=1}^m&space;p_i^{(k)}v_i\\&space;{\color{Red}u^{(k)}}&=\tilde{v}_I^{(k)}&plus;u^{(k-1)}&space;\end{aligned}"><img src="../assets/公式_20180911225643.png" height="" /></a></div>

> 本文取 `K=2`

@@ -437,7 +437,7 @@ Index
- `V = {v1, v2, .., vT}: [T, d_v]`,其中 v_i 为问题中每个词的词向量,`T` 表示问题的(最大)长度,不足该长度的补充全 0 词向量;
- `S = {s1, s2, .., sL}: [L, d_s]`,其中 s_i 为每个网格的特征向量,`L` 表示网格数;
- 则相关系数矩阵 `C: [T, L]` 为
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;C=V\cdot&space;(S\cdot&space;W_A&plus;b_A)^\mathsf{T}"><img src="../../assets/公式_20180911232200.png" height="" /></a></div>
<div align="center"><a href="http://www.codecogs.com/eqnedit.php?latex=\fn_jvn&space;C=V\cdot&space;(S\cdot&space;W_A&plus;b_A)^\mathsf{T}"><img src="../assets/公式_20180911232200.png" height="" /></a></div>

- 基于以上想法,本文提出了两种模型 "One-Hop Model" 和 "Two-Hop Model"
- One-Hop Model 使用整合后的问题特征和加权视觉特征来预测答案;
@@ -450,7 +450,7 @@ Index
- **输入模块**
- **文本问答**的输入为一系列**可能**与问题相关的**情景句子**(上下文);
- **视觉问答**的输入为**网格划分**后的图像,每一块网格作为**可能**与问题相关的**情景**
<!-- <div align="center"><img src="../../assets/TIM截图20180912202657.png" height="" /></div> -->
<!-- <div align="center"><img src="../assets/TIM截图20180912202657.png" height="" /></div> -->
- **情景记忆模块**用于提取输入中的相关事实;每次迭代时更新内部记忆单元;
- **回答模块**通过整合最终的记忆单元与问题的表示来生成答案(RNN)。

@@ -462,14 +462,14 @@ Index
- **parallel co-attention** 同时关注问题和图像;
- **alternative co-attention** 同时在关注问题或图像间交替进行;
- 最终的答案通过由低到高依次融合三个层级的特征来预测。
<div align="center"><img src="../../assets/TIM截图20180912210803.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180912210803.png" height="" /></div>

#### [56] Dual attention networks for multimodal reasoning and matching
- 本文的主要思想是允许问题于图像互相 Attention,从而直接关注关键词或关键区域。
> 思想跟 co-attention 类似,但是做法不同。
- 为了实现这一点,本文先将图像特征和问题特征整合为**记忆向量**(按位乘),然后利用该记忆向量**分别**对问题和图像构建 Attention 向量。
- 该过程可以递归的进行,下一轮的输入为上一轮得到两个 Attention 向量;
<div align="center"><img src="../../assets/TIM截图20180912212748.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180912212748.png" height="" /></div>

> 但是作者建议迭代 2 次即可。

@@ -485,8 +485,8 @@ Index
- 本文使用了 Multimodal Compact Bilinear pooling(MCB)作为整个图像与问题特征的新方法;
- 如果直接对图像和问题进行外积会导致特征维度不可控,因此 MCB 在一个**低维的空间**下进行外积运算;
- 文本计算 Attention 的做法类似 [[49]](#49-stacked-attention-networks-for-image-question-answeringsan),区别在于使用 **MCB 操作**代替**双线性 Attention**
> 双线性 Attention,即 `T·W·V`——使用一个权重矩阵 `W` 作为两个向量 `T` 和 `V` 的交互中介。
<div align="center"><img src="../../assets/TIM截图20180912230713.png" height="" /></div>
> 双线性 Attention,即 `Q·W·V`——使用一个权重矩阵 `W` 作为两个向量 `Q` 和 `V` 的交互中介。
<div align="center"><img src="../assets/TIM截图20180912230713.png" height="" /></div>

- 本文模型是 2016 VQA 比赛的获胜模型

Original file line number Diff line number Diff line change
@@ -15,6 +15,6 @@ Index

- 本文将**动态记忆网络**(Dynamic Memory Networks, DMN)引入 QA 问题。
- DMN 主要分为四个模块:问题模块、输入模块、情景记忆模块、回答模块
<div align="center"><img src="../../assets/TIM截图20180912115327.png" height="" /></div>
<div align="center"><img src="../assets/TIM截图20180912115327.png" height="" /></div>

-
14 changes: 0 additions & 14 deletions papers/QA模型/README.md

This file was deleted.

18 changes: 16 additions & 2 deletions papers/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
论文笔记
===

Index
---
<!-- TOC -->

## QA模型
- 问答、机器阅读理解、视觉问答
- [QA 模型](#qa-模型)
- [问答(QA) TODO](#问答qa-todo)
- [视觉问答(VisualQA, VQA)](#视觉问答visualqa-vqa)

<!-- /TOC -->


## QA 模型
### 问答(QA) TODO

### 视觉问答(VisualQA, VQA)
- [综述](./QA-视觉问答-A-综述.md)
- [摘要](./QA-视觉问答-A-摘要.md)
Binary file not shown.
Binary file not shown.
Binary file not shown.