Skip to content
Junya Yang | Academic Homepage
Search
K
Main Navigation
Home
Research
Projects
Blog
Tags
Archive
Friends
Note
Compiler Construction
Computer Graphics
Computer Organization
Computer Network
Database Management System
Functional Programming
Operating System
Theory Of Computation
Appearance
Menu
Return to top
On this page
Post
Computer Vision / Lecture
CV-Attention
2024-12-20
NOTE
CV
Attention
Transformer
Back to Blog
Copy link
CV-Attention
Attention Mechanism
Attention Score:
q
1
=
W
q
a
1
k
1
=
W
k
a
1
k
2
=
W
k
a
2
k
3
=
W
k
a
3
k
4
=
W
k
a
4
a
1
,
1
=
q
1
k
1
a
1
,
2
=
q
1
k
2
a
1
,
3
=
q
1
k
3
a
1
,
4
=
q
1
k
4
q
i
=
W
q
a
i
k
i
=
W
k
a
i
v
i
=
W
v
a
i
A
=
K
T
Q
A
′
=
s
o
f
t
m
a
x
(
A
)
O
=
V
T
A
′
Take away:
Q
=
W
q
I
K
=
W
k
I
V
=
W
v
I
A
=
K
T
Q
A
′
=
s
o
f
t
m
a
x
(
A
)
O
=
V
T
A
′
Multi-Head Attention
Transformer