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
NiuTrans
Toy-MT-Introduction
Commits
dd84626e
Commit
dd84626e
authored
Apr 24, 2020
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates of section 6
parent
12135f44
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
24 行增加
和
24 行删除
+24
-24
Book/Chapter6/Chapter6.tex
+0
-0
Book/Chapter6/Figures/figure-Different-regularization-methods.tex
+2
-2
Book/Chapter6/Figures/figure-Position-of-difference-and-layer-regularization-in-the-model.tex
+3
-3
Book/Chapter6/Figures/figure-Position-of-feedforward-neural-network-in-the-model.tex
+3
-3
Book/Chapter6/Figures/figure-Position-of-self-attention-mechanism-in-the-model.tex
+3
-3
Book/Chapter6/Figures/figure-Residual-network-structure.tex
+1
-1
Book/Chapter6/Figures/figure-Transformer-input-and-position-encoding.tex
+3
-3
Book/Chapter6/Figures/figure-transformer.tex
+3
-3
Book/mt-book-xelatex.idx
+0
-0
Book/mt-book-xelatex.ptc
+0
-0
Book/mt-book-xelatex.tex
+6
-6
没有找到文件。
Book/Chapter6/Chapter6.tex
查看文件 @
dd84626e
差异被折叠。
点击展开。
Book/Chapter6/Figures/figure-Different-regularization-methods.tex
查看文件 @
dd84626e
...
...
@@ -7,10 +7,10 @@
\tikzstyle
{
lnode
}
= [minimum height=1.5em,minimum width=3em,inner sep=3pt,rounded corners=1.5pt,draw,fill=orange!20];
\tikzstyle
{
standard
}
= [rounded corners=3pt]
\node
[lnode,anchor=west] (l1) at (0,0)
{
\scriptsize
{
子层
n
}}
;
\node
[lnode,anchor=west] (l1) at (0,0)
{
\scriptsize
{
子层
$
n
$
}}
;
\node
[lnode,anchor=west] (l2) at ([xshift=3em]l1.east)
{
\scriptsize
{
层正则化
}}
;
\node
[lnode,anchor=west] (l3) at ([xshift=4em]l2.east)
{
\scriptsize
{
层正则化
}}
;
\node
[lnode,anchor=west] (l4) at ([xshift=1.5em]l3.east)
{
\scriptsize
{
子层
n
}}
;
\node
[lnode,anchor=west] (l4) at ([xshift=1.5em]l3.east)
{
\scriptsize
{
子层
$
n
$
}}
;
\node
[anchor=west] (plus1) at ([xshift=0.9em]l1.east)
{
\scriptsize
{$
\mathbf
{
\oplus
}$}}
;
\node
[anchor=west] (plus2) at ([xshift=0.9em]l4.east)
{
\scriptsize
{$
\mathbf
{
\oplus
}$}}
;
...
...
Book/Chapter6/Figures/figure-Position-of-difference-and-layer-regularization-in-the-model.tex
查看文件 @
dd84626e
...
...
@@ -19,7 +19,7 @@
\node
[Resnode,anchor=south] (res2) at ([yshift=0.3em]ffn1.north)
{
\tiny
{$
\textbf
{
Add
\&
LayerNorm
}$}}
;
\node
[inputnode,anchor=north west] (input1) at ([yshift=-1em]sa1.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos1) at ([yshift=-1em]sa1.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
tiny
{$
\textbf
{
编码器输入: 我 很
好
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
scriptsize
{$
\textbf
{
编码器输入: 我
\ \
很
\ \
好
}$}}
;
\node
[anchor=south] (encoder) at ([xshift=0.2em,yshift=0.6em]res2.north west)
{
\scriptsize
{
\textbf
{
编码器
}}}
;
\draw
[->] (sa1.north) -- (res1.south);
...
...
@@ -38,9 +38,9 @@
\node
[outputnode,anchor=south] (o1) at ([yshift=1em]res5.north)
{
\tiny
{$
\textbf
{
Output layer
}$}}
;
\node
[inputnode,anchor=north west] (input2) at ([yshift=-1em]sa2.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos2) at ([yshift=-1em]sa2.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
tiny
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
scriptsize
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=east] (decoder) at ([xshift=-1em,yshift=-1.5em]o1.west)
{
\scriptsize
{
\textbf
{
解码器
}}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
tiny
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
scriptsize
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\draw
[->] (sa2.north) -- (res3.south);
\draw
[->] (res3.north) -- (ed1.south);
...
...
Book/Chapter6/Figures/figure-Position-of-feedforward-neural-network-in-the-model.tex
查看文件 @
dd84626e
...
...
@@ -17,7 +17,7 @@
\node
[Resnode,anchor=south] (res2) at ([yshift=0.3em]ffn1.north)
{
\tiny
{$
\textbf
{
Add
\&
LayerNorm
}$}}
;
\node
[inputnode,anchor=north west] (input1) at ([yshift=-1em]sa1.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos1) at ([yshift=-1em]sa1.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
tiny
{$
\textbf
{
编码器输入: 我 很
好
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
scriptsize
{$
\textbf
{
编码器输入: 我
\ \
很
\ \
好
}$}}
;
\node
[anchor=south] (encoder) at ([xshift=0.2em,yshift=0.6em]res2.north west)
{
\scriptsize
{
\textbf
{
编码器
}}}
;
\draw
[->] (sa1.north) -- (res1.south);
...
...
@@ -36,9 +36,9 @@
\node
[outputnode,anchor=south] (o1) at ([yshift=1em]res5.north)
{
\tiny
{$
\textbf
{
Output layer
}$}}
;
\node
[inputnode,anchor=north west] (input2) at ([yshift=-1em]sa2.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos2) at ([yshift=-1em]sa2.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
tiny
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
scriptsize
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=east] (decoder) at ([xshift=-1em,yshift=-1.5em]o1.west)
{
\scriptsize
{
\textbf
{
解码器
}}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
tiny
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
scriptsize
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\draw
[->] (sa2.north) -- (res3.south);
\draw
[->] (res3.north) -- (ed1.south);
...
...
Book/Chapter6/Figures/figure-Position-of-self-attention-mechanism-in-the-model.tex
查看文件 @
dd84626e
...
...
@@ -18,7 +18,7 @@
\node
[Resnode,anchor=south] (res2) at ([yshift=0.3em]ffn1.north)
{
\tiny
{$
\textbf
{
Add
\&
LayerNorm
}$}}
;
\node
[inputnode,anchor=north west] (input1) at ([yshift=-1em]sa1.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos1) at ([yshift=-1em]sa1.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
tiny
{$
\textbf
{
编码器输入: 我 很
好
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
scriptsize
{$
\textbf
{
编码器输入: 我
\ \
很
\ \
好
}$}}
;
\node
[anchor=south] (encoder) at ([xshift=0.2em,yshift=0.6em]res2.north west)
{
\scriptsize
{
\textbf
{
编码器
}}}
;
\draw
[->] (sa1.north) -- (res1.south);
...
...
@@ -37,9 +37,9 @@
\node
[outputnode,anchor=south] (o1) at ([yshift=1em]res5.north)
{
\tiny
{$
\textbf
{
Output layer
}$}}
;
\node
[inputnode,anchor=north west] (input2) at ([yshift=-1em]sa2.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos2) at ([yshift=-1em]sa2.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
tiny
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
scriptsize
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=east] (decoder) at ([xshift=-1em,yshift=-1.5em]o1.west)
{
\scriptsize
{
\textbf
{
解码器
}}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
tiny
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
scriptsize
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\draw
[->] (sa2.north) -- (res3.south);
\draw
[->] (res3.north) -- (ed1.south);
...
...
Book/Chapter6/Figures/figure-Residual-network-structure.tex
查看文件 @
dd84626e
...
...
@@ -10,7 +10,7 @@
\node
[lnode,anchor=west] (l2) at ([xshift=3em]l1.east)
{
\scriptsize
{
子层2
}}
;
\node
[lnode,anchor=west] (l3) at ([xshift=3em]l2.east)
{
\scriptsize
{
子层3
}}
;
\node
[anchor=west,inner sep=2pt] (dot1) at ([xshift=1em]l3.east)
{
\scriptsize
{$
\textbf
{
...
}$}}
;
\node
[lnode,anchor=west] (l4) at ([xshift=1em]dot1.east)
{
\scriptsize
{
子层
n
}}
;
\node
[lnode,anchor=west] (l4) at ([xshift=1em]dot1.east)
{
\scriptsize
{
子层
$
n
$
}}
;
\node
[anchor=west] (plus1) at ([xshift=0.9em]l1.east)
{
\scriptsize
{$
\mathbf
{
\oplus
}$}}
;
\node
[anchor=west] (plus2) at ([xshift=0.9em]l2.east)
{
\scriptsize
{$
\mathbf
{
\oplus
}$}}
;
...
...
Book/Chapter6/Figures/figure-Transformer-input-and-position-encoding.tex
查看文件 @
dd84626e
...
...
@@ -17,7 +17,7 @@
\node
[Resnode,anchor=south] (res2) at ([yshift=0.3em]ffn1.north)
{
\tiny
{$
\textbf
{
Add
\&
LayerNorm
}$}}
;
\node
[inputnode,anchor=north west] (input1) at ([yshift=-1em]sa1.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos1) at ([yshift=-1em]sa1.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
tiny
{$
\textbf
{
编码器输入: 我 很
好
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
scriptsize
{$
\textbf
{
编码器输入: 我
\ \
很
\ \
好
}$}}
;
\node
[anchor=south] (encoder) at ([xshift=0.2em,yshift=0.6em]res2.north west)
{
\scriptsize
{
\textbf
{
编码器
}}}
;
\draw
[->] (sa1.north) -- (res1.south);
...
...
@@ -36,9 +36,9 @@
\node
[outputnode,anchor=south] (o1) at ([yshift=1em]res5.north)
{
\tiny
{$
\textbf
{
Output layer
}$}}
;
\node
[inputnode,anchor=north west] (input2) at ([yshift=-1em]sa2.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos2) at ([yshift=-1em]sa2.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
tiny
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
scriptsize
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=east] (decoder) at ([xshift=-1em,yshift=-1.5em]o1.west)
{
\scriptsize
{
\textbf
{
解码器
}}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
tiny
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
scriptsize
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\draw
[->] (sa2.north) -- (res3.south);
\draw
[->] (res3.north) -- (ed1.south);
...
...
Book/Chapter6/Figures/figure-transformer.tex
查看文件 @
dd84626e
...
...
@@ -16,7 +16,7 @@
\node
[Resnode,anchor=south] (res2) at ([yshift=0.3em]ffn1.north)
{
\tiny
{$
\textbf
{
Add
\&
LayerNorm
}$}}
;
\node
[inputnode,anchor=north west] (input1) at ([yshift=-1em]sa1.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos1) at ([yshift=-1em]sa1.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
tiny
{$
\textbf
{
编码器输入: 我 很
好
}$}}
;
\node
[anchor=north] (inputs) at ([yshift=-3em]sa1.south)
{
\
scriptsize
{$
\textbf
{
编码器输入: 我
\ \
很
\ \
好
}$}}
;
\node
[anchor=south] (encoder) at ([xshift=0.2em,yshift=0.6em]res2.north west)
{
\scriptsize
{
\textbf
{
编码器
}}}
;
\draw
[->] (sa1.north) -- (res1.south);
...
...
@@ -35,9 +35,9 @@
\node
[outputnode,anchor=south] (o1) at ([yshift=1em]res5.north)
{
\tiny
{$
\textbf
{
Output layer
}$}}
;
\node
[inputnode,anchor=north west] (input2) at ([yshift=-1em]sa2.south west)
{
\tiny
{$
\textbf
{
Embedding
}$}}
;
\node
[posnode,anchor=north east] (pos2) at ([yshift=-1em]sa2.south east)
{
\tiny
{$
\textbf
{
Postion
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
tiny
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=north] (outputs) at ([yshift=-3em]sa2.south)
{
\
scriptsize
{$
\textbf
{
解码器输入:
$
<
$
sos
$
>
$
I am fine
}$}}
;
\node
[anchor=east] (decoder) at ([xshift=-1em,yshift=-1.5em]o1.west)
{
\scriptsize
{
\textbf
{
解码器
}}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
tiny
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\node
[anchor=north] (decoutputs) at ([yshift=1.5em]o1.north)
{
\
scriptsize
{$
\textbf
{
解码器输出: I am fine
$
<
$
eos
$
>
$
}$}}
;
\draw
[->] (sa2.north) -- (res3.south);
\draw
[->] (res3.north) -- (ed1.south);
...
...
Book/mt-book-xelatex.idx
查看文件 @
dd84626e
差异被折叠。
点击展开。
Book/mt-book-xelatex.ptc
查看文件 @
dd84626e
差异被折叠。
点击展开。
Book/mt-book-xelatex.tex
查看文件 @
dd84626e
...
...
@@ -112,13 +112,13 @@
% CHAPTERS
%----------------------------------------------------------------------------------------
%
\include{Chapter1/chapter1}
%
\include{Chapter2/chapter2}
%
\include{Chapter3/chapter3}
%
\include{Chapter4/chapter4}
%
\include{Chapter5/chapter5}
\include
{
Chapter1/chapter1
}
\include
{
Chapter2/chapter2
}
\include
{
Chapter3/chapter3
}
\include
{
Chapter4/chapter4
}
\include
{
Chapter5/chapter5
}
\include
{
Chapter6/chapter6
}
%
\include{ChapterAppend/chapterappend}
\include
{
ChapterAppend/chapterappend
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论