Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
Toy-MT-Introduction
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
单韦乔
Toy-MT-Introduction
Commits
cd8276c9
Commit
cd8276c9
authored
Mar 01, 2020
by
姜雨帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update figures
parent
aa6c2d09
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
68 行增加
和
48 行删除
+68
-48
Section06-Neural-Machine-Translation/section06.tex
+68
-48
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
cd8276c9
...
...
@@ -3908,7 +3908,6 @@ $\textrm{``you''} = \argmax_{y_2} \textrm{P}(y_2|\textbf{s}_1, y_1)$ & $\textrm{
\end{itemize}
\end{frame}
%
%%%------------------------------------------------------------------------------------------------------------
%%% 自注意力机制(续)
...
...
@@ -3921,63 +3920,74 @@ $\textrm{``you''} = \argmax_{y_2} \textrm{P}(y_2|\textbf{s}_1, y_1)$ & $\textrm{
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
rnode
}
= [draw,minimum width=
3.5
em,minimum height=1.2em]
\tikzstyle
{
rnode
}
= [draw,minimum width=
2.8
em,minimum height=1.2em]
\node
[rnode,anchor=south west,fill=red!20!white] (value1) at (0,0)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value2) at ([xshift=1em]value1.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value3) at ([xshift=1em]value2.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value4) at ([xshift=1em]value3.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value5) at ([xshift=1em]value4.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key1) at ([yshift=0.2em]value1.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key2) at ([yshift=0.2em]value2.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key3) at ([yshift=0.2em]value3.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key4) at ([yshift=0.2em]value4.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west] (key5) at ([yshift=0.2em]value5.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\node
[anchor=south] (sep) at ([yshift=1em]key1.north)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\draw
[->] ([yshift=1pt,xshift=-3pt]key5.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key4.north);
\draw
[->] ([yshift=1pt,xshift=0pt]key5.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key3.north);
\draw
[->] ([yshift=1pt,xshift=3pt]key5.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key2.north);
\draw
[->] ([yshift=1pt,xshift=6pt]key5.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key1.north);
\node
[anchor=south west] (alpha1) at ([xshift=-1em]key1.north west)
{
\scriptsize
{$
\alpha
_
1
=
.
2
$}}
;
\node
[anchor=south west] (alpha2) at ([xshift=-1em]key2.north west)
{
\scriptsize
{$
\alpha
_
2
=
.
3
$}}
;
\node
[anchor=south west] (alpha3) at ([xshift=-1em]key3.north west)
{
\scriptsize
{$
\alpha
_
3
=
.
1
$}}
;
\node
[anchor=south west] (alpha4) at ([xshift=-1em]key4.north west)
{
\scriptsize
{$
\alpha
_
4
=
.
3
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value2) at ([xshift=0.8em]value1.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value3) at ([xshift=0.8em]value2.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value4) at ([xshift=0.8em]value3.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=red!20!white] (value5) at ([xshift=0.8em]value4.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key1) at ([yshift=0.3em]value1.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key2) at ([yshift=0.3em]value2.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key3) at ([yshift=0.3em]value3.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key4) at ([yshift=0.3em]value4.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key5) at ([yshift=0.3em]value5.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\node
[rnode,anchor=east] (query5) at ([xshift=-1em]key1.west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\node
[anchor=south] (sep) at ([yshift=1em]query5.north)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\draw
[->] ([yshift=1pt,xshift=4pt]query5.north) .. controls +(90:0.6em) and +(90:0.6em) .. ([yshift=1pt]key1.north);
\draw
[->] ([yshift=1pt,xshift=0pt]query5.north) .. controls +(90:1.0em) and +(90:1.0em) .. ([yshift=1pt]key2.north);
\draw
[->] ([yshift=1pt,xshift=-4pt]query5.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key3.north);
\draw
[->] ([yshift=1pt,xshift=-8pt]query5.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key4.north);
\draw
[->] ([yshift=1pt,xshift=-12pt]query5.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key5.north);
\node
[anchor=south west] (alpha1) at ([xshift=0.3em]key1.north)
{
\scriptsize
{$
\alpha
_
1
$}}
;
\node
[anchor=south west] (alpha2) at ([xshift=0.3em]key2.north)
{
\scriptsize
{$
\alpha
_
2
$}}
;
\node
[anchor=south west] (alpha3) at ([xshift=0.3em]key3.north)
{
\scriptsize
{$
\alpha
_
3
$}}
;
\node
[anchor=south west] (alpha4) at ([xshift=0.3em]key4.north)
{
\scriptsize
{$
\alpha
_
4
$}}
;
\node
[anchor=south west] (alpha5) at ([xshift=0.3em]key5.north)
{
\scriptsize
{$
\alpha
_
5
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key6) at ([yshift=2em]key1.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key7) at ([yshift=2em]key2.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west] (key8) at ([yshift=2em]key3.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west
,fill=green!20!white
] (key8) at ([yshift=2em]key3.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key9) at ([yshift=2em]key4.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key10) at ([yshift=2em]key5.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\draw
[->] ([yshift=1pt,xshift=6pt]key8.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key9.north);
\draw
[->] ([yshift=1pt,xshift=3pt]key8.north) .. controls +(90:1.5em) and +(90:1.5em) .. ([yshift=1pt]key10.north);
\draw
[->] ([yshift=1pt]key8.north) .. controls +(90:1.5em) and +(90:1.5em) .. ([yshift=1pt]key6.north);
\draw
[->] ([yshift=1pt,xshift=-3pt]key8.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key7.north);
\node
[rnode,anchor=east] (query3) at ([xshift=-1em]key6.west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[anchor=south] (sep1) at ([yshift=1em]
key6
.north)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\node
[anchor=south] (sep1) at ([yshift=1em]
query3
.north)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\node
[anchor=south west] (alpha5) at ([xshift=-1em]key6.north west)
{
\scriptsize
{$
\alpha
_
1
=
.
1
$}}
;
\node
[anchor=south west] (alpha6) at ([xshift=-1em]key7.north west)
{
\scriptsize
{$
\alpha
_
2
=
.
5
$}}
;
\node
[anchor=south east] (alpha7) at ([xshift=1em]key9.north east)
{
\scriptsize
{$
\alpha
_
3
=
.
2
$}}
;
\node
[anchor=south east] (alpha8) at ([xshift=1em]key10.north east)
{
\scriptsize
{$
\alpha
_
4
=
.
1
$}}
;
\draw
[->] ([yshift=1pt,xshift=4pt]query3.north) .. controls +(90:0.6em) and +(90:0.6em) .. ([yshift=1pt]key6.north);
\draw
[->] ([yshift=1pt,xshift=0pt]query3.north) .. controls +(90:1.0em) and +(90:1.0em) .. ([yshift=1pt]key7.north);
\draw
[->] ([yshift=1pt,xshift=-4pt]query3.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key8.north);
\draw
[->] ([yshift=1pt,xshift=-8pt]query3.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key9.north);
\draw
[->] ([yshift=1pt,xshift=-12pt]query3.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key10.north);
\node
[anchor=south west] (alpha6) at ([xshift=0.3em]key6.north)
{
\scriptsize
{$
\alpha
_
1
$}}
;
\node
[anchor=south west] (alpha7) at ([xshift=0.3em]key7.north)
{
\scriptsize
{$
\alpha
_
2
$}}
;
\node
[anchor=south west] (alpha8) at ([xshift=0.3em]key8.north)
{
\scriptsize
{$
\alpha
_
3
$}}
;
\node
[anchor=south west] (alpha9) at ([xshift=0.3em]key9.north)
{
\scriptsize
{$
\alpha
_
4
$}}
;
\node
[anchor=south west] (alpha10) at ([xshift=0.3em]key10.north)
{
\scriptsize
{$
\alpha
_
5
$}}
;
\node
[rnode,anchor=south west] (key11) at ([yshift=2em]key6.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west
,fill=green!20!white
] (key11) at ([yshift=2em]key6.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key12) at ([yshift=2em]key7.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``什么''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key13) at ([yshift=2em]key8.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``也''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key14) at ([yshift=2em]key9.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``没''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key15) at ([yshift=2em]key10.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``学''
}
)
$}}
;
\draw
[->] ([yshift=1pt,xshift=6pt]key11.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key12.north);
\draw
[->] ([yshift=1pt,xshift=3pt]key11.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key13.north);
\draw
[->] ([yshift=1pt]key11.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key14.north);
\draw
[->] ([yshift=1pt,xshift=-3pt]key11.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key15.north);
\node
[anchor=south east] (alpha1) at ([xshift=1em]key12.north east)
{
\scriptsize
{$
\alpha
_
1
=
.
4
$}}
;
\node
[anchor=south east] (alpha2) at ([xshift=1em]key13.north east)
{
\scriptsize
{$
\alpha
_
2
=
.
4
$}}
;
\node
[anchor=south east] (alpha3) at ([xshift=1em]key14.north east)
{
\scriptsize
{$
\alpha
_
3
=
0
$}}
;
\node
[anchor=south east] (alpha4) at ([xshift=1em]key15.north east)
{
\scriptsize
{$
\alpha
_
4
=
.
1
$}}
;
\node
[rnode,anchor=east] (query1) at ([xshift=-1em]key11.west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``你''
}
)
$}}
;
\draw
[->] ([yshift=1pt,xshift=4pt]query1.north) .. controls +(90:0.6em) and +(90:0.6em) .. ([yshift=1pt]key11.north);
\draw
[->] ([yshift=1pt,xshift=0pt]query1.north) .. controls +(90:1.0em) and +(90:1.0em) .. ([yshift=1pt]key12.north);
\draw
[->] ([yshift=1pt,xshift=-4pt]query1.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key13.north);
\draw
[->] ([yshift=1pt,xshift=-8pt]query1.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key14.north);
\draw
[->] ([yshift=1pt,xshift=-12pt]query1.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key15.north);
\node
[anchor=south west] (alpha11) at ([xshift=0.3em]key11.north)
{
\scriptsize
{$
\alpha
_
1
$}}
;
\node
[anchor=south west] (alpha12) at ([xshift=0.3em]key12.north)
{
\scriptsize
{$
\alpha
_
2
$}}
;
\node
[anchor=south west] (alpha13) at ([xshift=0.3em]key13.north)
{
\scriptsize
{$
\alpha
_
3
$}}
;
\node
[anchor=south west] (alpha14) at ([xshift=0.3em]key14.north)
{
\scriptsize
{$
\alpha
_
4
$}}
;
\node
[anchor=south west] (alpha15) at ([xshift=0.3em]key15.north)
{
\scriptsize
{$
\alpha
_
5
$}}
;
\end{scope}
\end{tikzpicture}
...
...
@@ -4214,10 +4224,12 @@ $\textrm{``you''} = \argmax_{y_2} \textrm{P}(y_2|\textbf{s}_1, y_1)$ & $\textrm{
\node
[rnode,anchor=south west,fill=green!20!white] (key1) at (0,0)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``沈阳''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key2) at ([xshift=1em]key1.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``到''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key3) at ([xshift=1em]key2.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``广州''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key4) at ([xshift=
1em]key3.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``的
''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key4) at ([xshift=
2em]key3.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``机票
''
}
)
$}}
;
\node
[rnode,anchor=south west] (key5) at ([xshift=1em]key4.south east)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``机票''
}
)
$}}
;
\draw
[->] ([yshift=1pt,xshift=-3pt]key5.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key4.north);
\node
[anchor=west] (sep1) at ([xshift=0.3em]key3.east)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\draw
[->] ([yshift=1pt,xshift=-3pt]key5.north) .. controls +(90:1em) and +(90:0.7em) .. ([yshift=1pt]key4.north);
\draw
[->] ([yshift=1pt,xshift=0pt]key5.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key3.north);
\draw
[->] ([yshift=1pt,xshift=3pt]key5.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key2.north);
\draw
[->] ([yshift=1pt,xshift=6pt]key5.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key1.north);
...
...
@@ -4232,10 +4244,12 @@ $\textrm{``you''} = \argmax_{y_2} \textrm{P}(y_2|\textbf{s}_1, y_1)$ & $\textrm{
\node
[rnode,anchor=south west,fill=green!20!white] (key6) at ([yshift=2em]key1.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``广州''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key7) at ([yshift=2em]key2.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``到''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key8) at ([yshift=2em]key3.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``沈阳''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key9) at ([yshift=2em]key4.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``
的
''
}
)
$}}
;
\node
[rnode,anchor=south west,fill=green!20!white] (key9) at ([yshift=2em]key4.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``
机票
''
}
)
$}}
;
\node
[rnode,anchor=south west] (key10) at ([yshift=2em]key5.north west)
{
\scriptsize
{$
\textbf
{
h
}
(
\textrm
{
``机票''
}
)
$}}
;
\draw
[->] ([yshift=1pt,xshift=-3pt]key10.north) .. controls +(90:1em) and +(90:1em) .. ([yshift=1pt]key9.north);
\node
[anchor=west] (sep1) at ([xshift=0.3em]key8.east)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\draw
[->] ([yshift=1pt,xshift=-3pt]key10.north) .. controls +(90:1em) and +(90:0.7em) .. ([yshift=1pt]key9.north);
\draw
[->] ([yshift=1pt,xshift=0pt]key10.north) .. controls +(90:1.4em) and +(90:1.4em) .. ([yshift=1pt]key8.north);
\draw
[->] ([yshift=1pt,xshift=3pt]key10.north) .. controls +(90:1.8em) and +(90:1.8em) .. ([yshift=1pt]key7.north);
\draw
[->] ([yshift=1pt,xshift=6pt]key10.north) .. controls +(90:2.2em) and +(90:2.2em) .. ([yshift=1pt]key6.north);
...
...
@@ -4252,7 +4266,7 @@ $\textrm{``you''} = \argmax_{y_2} \textrm{P}(y_2|\textbf{s}_1, y_1)$ & $\textrm{
\vspace
{
-1.5em
}
\begin{eqnarray}
\textbf
{
C
}
(
\textrm
{
``机票''
}
)
&
=
&
0.2
\times
\textbf
{
h
}
(
\textrm
{
``沈阳''
}
) + 0.3
\times
\textbf
{
h
}
(
\textrm
{
``到''
}
) +
\nonumber
\\
&
&
0.1
\times
\textbf
{
h
}
(
\textrm
{
``广州''
}
) +
0.3
\times
\textbf
{
h
}
(
\textrm
{
``的
''
}
)
\nonumber
&
&
0.1
\times
\textbf
{
h
}
(
\textrm
{
``广州''
}
) +
... + 0.3
\times
\textbf
{
h
}
(
\textrm
{
``机票
''
}
)
\nonumber
\end{eqnarray}
\item
<2->为了解决这个问题,引入了
{
\color
{
red
}
\textbf
{
位置编码
}}
...
...
@@ -4858,7 +4872,7 @@ PE_{(pos,2i+1)} = cos(pos/10000^{2i/d_{model}})
\begin{displaymath}
x
_{
l+1
}
= x
_
l+
\mathcal
{
F
}
(x
_
l)
\end{displaymath}
\vspace
{
0
em
}
\vspace
{
-0.8
em
}
\begin{center}
\begin{tikzpicture}
\begin{scope}
...
...
@@ -4892,6 +4906,12 @@ x_{l+1} = x_l+\mathcal{F}(x_l)
\draw
[->,standard,very thick,red]
([xshift=-0.3em,yshift=-0.2em]plus2.north) -- ([xshift=-0.3em,yshift=1.8em]plus2.center) -- ([xshift=-0.5em,yshift=1.8em]l2.west) -- ([xshift=-0.5em,yshift=0.2em]l2.west);
\draw
[->,standard,very thick,red]
([xshift=-0.3em,yshift=-0.2em]plus1.north) -- ([xshift=-0.3em,yshift=1.8em]plus1.center) -- ([xshift=-0.5em,yshift=1.8em]l1.west) -- ([xshift=-0.5em,yshift=0.2em]l1.west);
\node
[anchor=west] (label1) at ([xshift=1em,yshift=1.5em]l3.north)
{
\tiny
{
前向计算
}}
;
\draw
[->,thick] ([xshift=-1.5em]label1.west) -- ([xshift=-0.1em]label1.west);
\node
[anchor=west] (label2) at ([xshift=2.5em]label1.east)
{
\tiny
{
反向传播
}}
;
\draw
[->,thick,red] ([xshift=-1.5em]label2.west) -- ([xshift=-0.1em]label2.west);
\end{scope}
\end{tikzpicture}
\end{center}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论