Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mtbookv2
概览
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
mtbookv2
Commits
5e1bdbd4
Commit
5e1bdbd4
authored
Jan 07, 2021
by
曹润柘
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'master' 到 'caorunzhe'
Master 查看合并请求
!811
parents
40f9e93d
b2f1d7cc
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
16 行增加
和
15 行删除
+16
-15
Chapter17/Figures/figure-cache.tex
+1
-1
Chapter17/Figures/figure-layer.tex
+4
-4
Chapter17/Figures/figure-multiencoder.tex
+5
-4
Chapter17/Figures/figure-the-encoder-explicitly-incorporates-semantic-information.tex
+2
-2
Chapter17/Figures/figure-twodecoding.tex
+4
-4
Chapter17/chapter17.tex
+0
-0
没有找到文件。
Chapter17/Figures/figure-cache.tex
查看文件 @
5e1bdbd4
...
...
@@ -15,7 +15,7 @@
\node
[anchor=south,font=\footnotesize,inner sep=0pt]
at ([yshift=0.1em]key.north)
{
key
}
;
\node
[anchor=south,font=\footnotesize,inner sep=0pt]
at ([yshift=0.2em]value.north)
{
value
}
;
\node
[anchor=south,font=\footnotesize,inner sep=0pt]
(cache)at ([yshift=2em,xshift=1.5em]key.north)
{
\small\bfnew
{
Cache
}}
;
\node
[anchor=south,font=\footnotesize,inner sep=0pt]
(cache)at ([yshift=2em,xshift=1.5em]key.north)
{
\small\bfnew
{
缓存
}}
;
\node
[draw,anchor=east,minimum size=1.8em,fill=orange!15]
(dt) at ([yshift=2.1em,xshift=-4em]key.west)
{${
\mathbi
{
d
}}_{
t
}$}
;
\node
[anchor=north,font=\footnotesize]
(readlab) at ([xshift=2.8em,yshift=0.3em]dt.north)
{
\red
{
读取
}}
;
...
...
Chapter17/Figures/figure-layer.tex
查看文件 @
5e1bdbd4
...
...
@@ -4,7 +4,7 @@
\foreach
\x
in
{
1,2,3,4
}
\node
[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt]
(c1
_
\x
) at (0em+2em*
\x
, 0em)
{}
;
\node
[anchor=north]
(hpre) at ([yshift=1.8em]c1
_
1.north)
{${
\mathbi
{
h
}}^
{
\textrm
{
pre
}
j
}$}
;
\node
[anchor=north]
(hpre) at ([yshift=1.8em]c1
_
1.north)
{${
\mathbi
{
h
}}^
{
\textrm
{
pre
}
k
}$}
;
\foreach
\x
in
{
1,2,3
}
\node
[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt]
(c2
_
\x
) at (11em+2em*
\x
, 0em)
{}
;
\node
[anchor=north]
(hpre) at ([yshift=1.8em]c2
_
1.north)
{${
\mathbi
{
h
}}^
{
\textrm
{
pre
}
1
}$}
;
...
...
@@ -29,7 +29,7 @@
\node
[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle]
(add3) at (10em, 5.2em)
{}
;
\node
[anchor=north]
(cond) at ([xshift=-1em,yshift=0.5em]add3.north)
{${
\mathbi
{
d
}}$}
;
\node
[anchor=north]
(cons1) at ([xshift=-1em,yshift=0.5em]add2.north)
{${
\mathbi
{
s
}}^
1
$}
;
\node
[anchor=north]
(consj) at ([xshift=-1em,yshift=0.5em]add1.north)
{${
\mathbi
{
s
}}^
j
$}
;
\node
[anchor=north]
(consj) at ([xshift=-1em,yshift=0.5em]add1.north)
{${
\mathbi
{
s
}}^
k
$}
;
\begin{pgfonlayer}
{
background
}
\node
[draw,rounded corners=2pt,drop shadow,fill=white, minimum width=8.3em][fit=(c1_1)(c1_4)]
(box1)
{}
;
\node
[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=6.4em][fit=(c2_1)(c2_3)]
(box2)
{}
;
...
...
@@ -67,8 +67,8 @@
\draw
[->,thick]
([yshift=0.1em]sigma.90) -- ([yshift=-0.1em]n2.-90);
\draw
[->,thick]
([yshift=0.1em]n2.90) -- node[right]
{$
\widetilde
{
\mathbi
{
h
}}_{
\textrm
{
t
}}$}
([yshift=2em]n2.90);
\draw
[decorate,decoration={brace, mirror},gray, thick]
([yshift=-2em]hh.-180) -- node[font=
\scriptsize
,text=black,below]
{
前几
句
}
([yshift=-2em]box2.0);
\draw
[decorate,decoration={brace, mirror},gray, thick]
([yshift=-2em]box3.-180) -- node[font=
\scriptsize
,text=black,below]
{
当前句
}
([yshift=-2em]box3.0);
\draw
[decorate,decoration={brace, mirror},gray, thick]
([yshift=-2em]hh.-180) -- node[font=
\scriptsize
,text=black,below]
{
前几
个句子
}
([yshift=-2em]box2.0);
\draw
[decorate,decoration={brace, mirror},gray, thick]
([yshift=-2em]box3.-180) -- node[font=
\scriptsize
,text=black,below]
{
当前句
子
}
([yshift=-2em]box3.0);
\draw
[->, thick, rounded corners=2pt]
([yshift=0.1em]add3.90) -- ([yshift=2.1em]add3.90) -- ([xshift=-0.1em]sigma.180);
...
...
Chapter17/Figures/figure-multiencoder.tex
查看文件 @
5e1bdbd4
...
...
@@ -6,21 +6,22 @@
\tikzstyle
{
every node
}
=[scale=0.7]
\node
(encoder
_
c)[coder]
{
\large
{
编码器
}}
;
\node
(encoder
_
s)[coder, right of = encoder
_
c, xshift=3.5cm, fill=red!25]
{
\large
{
编码器
}}
;
\node
(h
_
pre)[above of = encoder
_
c, yshift=1.3cm,scale=1.3]
{${
\mathbi
{
h
}}_{
pre
}$}
;
\node
(h
_
pre)[above of = encoder
_
c, yshift=1.3cm,scale=1.3]
{${
\mathbi
{
h
}}_{
\rm
pre
}$}
;
\node
(h)[above of = encoder
_
s, yshift=1.3cm,scale=1.3]
{$
\mathbi
{
h
}$}
;
\node
(cir)[circle,very thick, right of = h, draw=black!90,minimum width=0.5cm,xshift=1.1cm]
{}
;
\draw
[-,very thick,draw=black!90]
([xshift=0.04cm]cir.west)--([xshift=-0.04cm]cir.east);
\draw
[-,very thick,draw=black!90]
([yshift=-0.04cm]cir.north)--([yshift=0.04cm]cir.south);
\node
(last)[below of = encoder
_
c, yshift=-1.3cm]
{
\large
{
前一
句
}}
;
\node
(current)[below of = encoder
_
s, yshift=-1.3cm]
{
\large
{
当前句
}}
;
\node
(last)[below of = encoder
_
c, yshift=-1.3cm]
{
\large
{
前一
个句子
}}
;
\node
(current)[below of = encoder
_
s, yshift=-1.3cm]
{
\large
{
当前句
子
}}
;
\node
(attention
_
left)[attention, above of = encoder
_
c, xshift=2.4cm,yshift=3.1cm]
{
\large
{
注意力机制
}}
;
\node
(d)[above of = attention
_
left, yshift=1.1cm,scale=1.3]
{$
\mathbi
{
d
}$}
;
\node
(ground)[rectangle, thick, rounded corners, minimum width=5cm, minimum height=5.5cm, right of = encoder
_
s, xshift=4.4cm,yshift=2.2cm, draw=black!70, fill=gray!10]
{}
;
\node
(decoder)[above of = encoder
_
s, xshift=3.1cm]
{
\large
{
解码器
}}
;
\node
(attention
_
right)[attention, right of = attention
_
left, xshift=5.4cm,yshift=-0.4cm]
{
\large
{
注意力机制
}}
;
\node
(target)[right of = current, xshift=5.3cm]
{
\large
{
目标
句
}}
;
\node
(target)[right of = current, xshift=5.3cm]
{
\large
{
目标
语言句子(位置
$
j
$
之前)
}}
;
\node
(point
_
below)[right of = encoder
_
s, xshift=5.3cm]
{
\Huge
{
...
}}
;
\node
(point
_
above)[above of = attention
_
right, yshift=1.8cm]
{
\Huge
{
...
}}
;
\node
(target
_
above)[above of = attention
_
right, yshift=3.3cm]
{
\large
{
目标语言句子
}}
;
\draw
[->, very thick]
(last)to([yshift=-0.05cm]encoder
_
c.south);
\draw
[->, very thick]
(current)to([yshift=-0.05cm]encoder
_
s.south);
...
...
Chapter17/Figures/figure-the-encoder-explicitly-incorporates-semantic-information.tex
查看文件 @
5e1bdbd4
...
...
@@ -12,8 +12,8 @@
\node
(tree)[word, below of = sky, yshift=-0.75cm, fill=blue!15]
{
tree
}
;
\node
(cir)[circle,thick, minimum width=0.6cm, xshift=8cm, draw=black]
{}
;
\node
(decoder)[rectangle, rounded corners, minimum height=2.2em,minimum width=4.3em, right of = cir,xshift=3cm, draw=black, fill=blue!25]
{
\large
{
解码器
}}
;
\node
(yn
_
1)[below of = decoder,yshift=-2cm,scale=1.2]
{$
\rm
y
_{{
<
}_{
n
-
1
}
}$}
;
\node
(yn
_
2)[above of = decoder,yshift=2cm,scale=1.2]
{$
\rm
y
_{
n
-
1
}$
(bank)
}
;
\node
(yn
_
1)[below of = decoder,yshift=-2cm,scale=1.2]
{$
y
_{
<j
}$}
;
\node
(yn
_
2)[above of = decoder,yshift=2cm,scale=1.2]
{$
y
_{
j
}$
}
;
\draw
[->, thick]
([xshift=0.1cm]figure.east)to([xshift=2cm]figure.east);
\draw
[-,thick]
([xshift=-0.03cm]cir.east)to([xshift=0.03cm]cir.west);
...
...
Chapter17/Figures/figure-twodecoding.tex
查看文件 @
5e1bdbd4
...
...
@@ -9,17 +9,17 @@
\node
(encoder
_
left)[encoder, above of = decoder
_
left, yshift=1.6cm]
{
\normalsize
{
编码器
}}
;
\node
(encoder
_
right)[encoder, above of = decoder
_
right, yshift=1.6cm]
{
\normalsize
{
编码器
}}
;
\node
(text
_
left)[below of = encoder
_
left, yshift=1.5cm]
{
\normalsize
{
前文
}}
;
\node
(text
_
right)[below of = encoder
_
right, yshift=1.5cm]
{
\normalsize
{
源语
}}
;
\node
(text
_
right)[below of = encoder
_
right, yshift=1.5cm]
{
\normalsize
{
源语
言句子
}}
;
\node
(text
_
top)[above of = decoder
_
right, yshift=-1.6cm]
{
\normalsize
{
句子级翻译结果
}}
;
\node
(title
_
1)[above of = text
_
left, xshift=1.1cm, yshift=3cm]
{
\large\bfnew
{
一阶段
解码
}}
;
\node
(title
_
1)[above of = text
_
left, xshift=1.1cm, yshift=3cm]
{
\large\bfnew
{
一阶段
翻译
}}
;
\node
(ground2)[rectangle,very thick,rounded corners,minimum width=5cm,minimum height=5.8cm,right of = decoder
_
right,xshift=5.3cm,yshift=1.6cm,draw=black,dashed]
{}
;
\node
(ground1)[rectangle,thick,rounded corners,minimum width=3.3cm,minimum height=5cm,right of = decoder
_
right,xshift=4.8cm,yshift=1.58cm,draw=black,fill=yellow!15]
{}
;
\node
(attention
_
below)[attention, right of = decoder
_
right, xshift=4.8cm]
{
\normalsize
{
注意力机制
}}
;
\node
(attention
_
above)[attention, above of = attention
_
below, yshift=1.6cm]
{
\normalsize
{
注意力机制
}}
;
\node
(ffn)[attention, above of = attention
_
above, yshift=1.6cm, fill=blue!8]
{
\normalsize
{
前馈神经网络
}}
;
\node
(n)[right of = attention
_
above, xshift=2.4cm,scale=1.5]
{$
\times
N
$}
;
\node
(text
_
2)[above of = ffn, yshift=1.9cm]
{
\normalsize
{
上下文
修正结果
}}
;
\node
(title
_
2)[right of = title
_
1, xshift=6.3cm]
{
\large\bfnew
{
二阶段
解码
}}
;
\node
(text
_
2)[above of = ffn, yshift=1.9cm]
{
\normalsize
{
基于上下文的
修正结果
}}
;
\node
(title
_
2)[right of = title
_
1, xshift=6.3cm]
{
\large\bfnew
{
二阶段
翻译
}}
;
%\node(text_rright)[right of = text_right, xshift=5.5cm]{\normalsize{句子级翻译结果}};
\draw
[->,very thick]
([yshift=-0.1cm]text
_
left.south)to(encoder
_
left.north);
...
...
Chapter17/chapter17.tex
查看文件 @
5e1bdbd4
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论