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
bd87e7ad
Commit
bd87e7ad
authored
Nov 24, 2021
by
zengxin
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'master' 到 'zengxin'
Master 查看合并请求
!295
parents
e10fac8e
dee6cf16
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
166 行增加
和
174 行删除
+166
-174
Book/Chapter3/Figures/figure-human-translation.tex
+2
-2
Book/Chapter3/Figures/figure-noise-channel-model.tex
+2
-1
Book/Chapter3/Figures/figure-process-of-machine-translation.tex
+2
-2
Book/Chapter3/Figures/greedy-mt-decoding-process-1.tex
+6
-6
Book/Chapter3/Figures/greedy-mt-decoding-process-3.tex
+6
-6
Book/Chapter3/chapter3.tex
+12
-12
Book/Chapter4/Figures/grid-search-2.tex
+0
-43
Book/Chapter4/Figures/grid-search.tex
+44
-2
Book/Chapter4/Figures/search-space-representation-of-feature-weight-1.tex
+0
-30
Book/Chapter4/Figures/search-space-representation-of-feature-weight-2.tex
+0
-41
Book/Chapter4/Figures/search-space-representation-of-feature-weight.tex
+69
-2
Book/Chapter4/chapter4.tex
+2
-6
Book/ChapterAppend/chapterappend.tex
+0
-0
Book/mt-book-xelatex.idx
+0
-0
Book/mt-book-xelatex.ptc
+0
-0
Section03-Word-Based-Models/section03.tex
+19
-19
Section05-Neural-Networks-and-Language-Modeling/section05.tex
+2
-2
没有找到文件。
Book/Chapter3/Figures/figure-human-translation.tex
查看文件 @
bd87e7ad
...
...
@@ -8,7 +8,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=2em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=2em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2em]s4.east)
{{
满意
}}
;
\node
[anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west)
{
\scriptsize
{
\sffamily\bfseries
{
\color
{
red
}{
待翻译句子(已经分词):
}}}}
;
...
...
@@ -38,7 +38,7 @@
\node
[anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
...
...
Book/Chapter3/Figures/figure-noise-channel-model.tex
查看文件 @
bd87e7ad
...
...
@@ -9,7 +9,8 @@
\node
[draw,red,fill=red!10,thick,anchor=center,circle,inner sep=3.5pt] (s) at (0,0)
{
\black
{$
\mathbf
{
s
}$}}
;
\node
[draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=3.3pt] (t) at ([xshift=1.5in]s.east)
{
\black
{$
\mathbf
{
t
}$}}
;
\draw
[<->,thick,] (s.east) -- (t.west) node [pos=0.5,draw,fill=white]
{
噪声信道
}
;
\draw
[->,thick,] (s.east) -- (t.west) node [pos=0.5,draw,fill=white]
{
噪声信道
}
;
\draw
[->,thick]
(s.east) -- ([xshift=2.2em]s.east);
\node
[anchor=east] at (s.west)
{
\scriptsize
{
信宿
}}
;
\node
[anchor=west] at (t.east)
{
\scriptsize
{
信源
}}
;
...
...
Book/Chapter3/Figures/figure-process-of-machine-translation.tex
查看文件 @
bd87e7ad
...
...
@@ -5,7 +5,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=2em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=2em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2em]s4.east)
{{
满意
}}
;
\node
[anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west)
{
\scriptsize
{{
\color
{
red
}{
待翻译句子(已经分词):
}}}}
;
...
...
@@ -35,7 +35,7 @@
\node
[anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
...
...
Book/Chapter3/Figures/greedy-mt-decoding-process-1.tex
查看文件 @
bd87e7ad
...
...
@@ -16,7 +16,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=3em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=3em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2.5em]s4.east)
{{
满意
}}
;
\node
[anchor=south west,inner sep=1pt] (sentlabel) at ([yshift=0.3em]s1.north west)
{
\scriptsize
{{
输入: 待翻译句子(已经分词)
}}}
;
...
...
@@ -53,8 +53,8 @@
{
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t41) at ([yshift=-1.3em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
show
s
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
feel
s
}
;
}
{
...
...
@@ -121,7 +121,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=3em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=3em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2.5em]s4.east)
{{
满意
}}
;
\node
[anchor=south west,inner sep=1pt] (sentlabel) at ([yshift=0.3em]s1.north west)
{
\scriptsize
{{
输入: 待翻译句子(已经分词)
}}}
;
...
...
@@ -160,8 +160,8 @@
{
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t41) at ([yshift=-1.3em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
show
s
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
feel
s
}
;
}
...
...
Book/Chapter3/Figures/greedy-mt-decoding-process-3.tex
查看文件 @
bd87e7ad
...
...
@@ -11,7 +11,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=3em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=3em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2.5em]s4.east)
{{
满意
}}
;
\node
[anchor=south west,inner sep=1pt] (sentlabel) at ([yshift=0.3em]s1.north west)
{
\scriptsize
{{
输入: 待翻译句子(已经分词)
}}}
;
...
...
@@ -50,8 +50,8 @@
{
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t41) at ([yshift=-1.3em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
show
s
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
feel
s
}
;
}
...
...
@@ -176,7 +176,7 @@
\node
[anchor=west] (s1) at (0,0)
{{
我
}}
;
\node
[anchor=west] (s2) at ([xshift=3em]s1.east)
{{
对
}}
;
\node
[anchor=west] (s3) at ([xshift=3em]s2.east)
{{
你
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
表示
}}
;
\node
[anchor=west] (s4) at ([xshift=2.5em]s3.east)
{{
感到
}}
;
\node
[anchor=west] (s5) at ([xshift=2.5em]s4.east)
{{
满意
}}
;
\node
[anchor=south west,inner sep=1pt] (sentlabel) at ([yshift=0.3em]s1.north west)
{
\scriptsize
{{
输入: 待翻译句子(已经分词)
}}}
;
...
...
@@ -215,8 +215,8 @@
{
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t41) at ([yshift=-1.3em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
show
s
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t42) at ([yshift=-0.2em]t41.south)
{
feel
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3.5em] (t43) at ([yshift=-0.2em]t42.south)
{
feel
s
}
;
}
...
...
Book/Chapter3/chapter3.tex
查看文件 @
bd87e7ad
...
...
@@ -111,7 +111,7 @@
%----------------------------------------------
\vspace
{
-0.2em
}
\parinterval
图
\ref
{
fig:3-3
}
展示了人在翻译``我
对 你表示
满意''时可能会思考的内容。具体来说,有如下两方面内容。
\parinterval
图
\ref
{
fig:3-3
}
展示了人在翻译``我
\;
对
\;
你
\;
感到
\;
满意''时可能会思考的内容。具体来说,有如下两方面内容。
\begin{itemize}
\vspace
{
0.5em
}
...
...
@@ -243,9 +243,9 @@
\begin{example}
一个汉英互译的句对
\qquad\qquad\quad
$
\mathbf
{
s
}$
= 机器
\quad
{
\color
{
red
}
翻译
}
\;
就
\;
是
\;
用
\;
计算机
\;
来
\;
进行
\;
{
\color
{
red
}
翻译
}
$
\mathbf
{
s
}$
= 机器
\quad
{
\color
{
red
}
翻译
}
\;
就
\;
是
\;
用
\;
计算机
\;
来
\;
生成
\;
{
\color
{
red
}
翻译
}
\;
的
\;
过程
\qquad\qquad\quad
$
\mathbf
{
t
}$
= machine
\;
{
\color
{
red
}
translation
}
\;
is
\;
just
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
$
\mathbf
{
t
}$
= machine
\;
{
\color
{
red
}
translation
}
\;
is
\;
a
\;
process
\;
of
\;
generating
\;
a
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
\label
{
eg:3-1
}
\end{example}
...
...
@@ -253,14 +253,14 @@
\begin{eqnarray}
\textrm
{
P
}
(
\text
{
``翻译''
}
,
\text
{
``translation''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
=
&
\frac
{
c(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}{
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}
\nonumber
\\
&
=
&
\frac
{
4
}{
|
\mathbf
{
s
}
|
\times
|
\mathbf
{
t
}
|
}
\nonumber
\\
&
=
&
\frac
{
4
}{
63
}
&
=
&
\frac
{
4
}{
121
}
\label
{
eq:3-2
}
\end{eqnarray}
\noindent
这里运算
$
|
\cdot
|
$
表示句子长度。类似的,可以得到``机器''和``translation''、``机器''和``look''的单词翻译概率:
\begin{eqnarray}
\textrm
{
P
}
(
\text
{
``机器''
}
,
\text
{
``translation''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
=
&
\frac
{
2
}{
63
}
\\
\textrm
{
P
}
(
\text
{
``机器''
}
,
\text
{
``look''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
=
&
\frac
{
0
}{
63
}
\textrm
{
P
}
(
\text
{
``机器''
}
,
\text
{
``translation''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
=
&
\frac
{
2
}{
121
}
\\
\textrm
{
P
}
(
\text
{
``机器''
}
,
\text
{
``look''
}
;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
=
&
\frac
{
0
}{
121
}
\label
{
eq:3-3
}
\end{eqnarray}
...
...
@@ -283,13 +283,13 @@
\begin{example}
两个汉英互译的句对
\qquad\qquad
\;
$
\mathbf
{
s
}^
1
$
= 机器
\quad
{
\color
{
red
}
翻译
}
\;
就
\;
是
\;
用
\;
计算机
\;
来
\;
进行
\;
{
\color
{
red
}
翻译
}
$
\mathbf
{
s
}^{
[
1
]
}$
= 机器
\quad
{
\color
{
red
}
翻译
}
\;
就
\;
是
\;
用
\;
计算机
\;
来
\;
生成
\;
{
\color
{
red
}
翻译
}
\;
的
\;
过程
\qquad\qquad\;
$
\mathbf
{
s
}^
1
$
= Machine
\;
{
\color
{
red
}
translation
}
\;
is
\;
just
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
$
\mathbf
{
t
}^{
[
1
]
}$
= machine
\;
{
\color
{
red
}
translation
}
\;
is
\;
a
\;
process
\;
of
\;
generating
\;
a
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
\qquad\qquad\;
$
\mathbf
{
s
}^
2
$
= 那
\quad
人工
\quad
{
\color
{
red
}
翻译
}
\quad
呢
\quad
?
$
\mathbf
{
s
}^{
[
2
]
}
$
= 那
\quad
人工
\quad
{
\color
{
red
}
翻译
}
\quad
呢
\quad
?
\qquad\qquad\;
$
\mathbf
{
t
}^
2
$
= So
\;
,
\;
what
\;
is
\;
human
\;
{
\color
{
red
}
translation
}
\;
?
$
\mathbf
{
t
}^{
[
2
]
}
$
= So
\;
,
\;
what
\;
is
\;
human
\;
{
\color
{
red
}
translation
}
\;
?
\label
{
eg:3-2
}
\end{example}
...
...
@@ -298,8 +298,8 @@
\begin{eqnarray}
{
\textrm
{
P
}
(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
)
}
&
=
&
{
\frac
{
c(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
;
\mathbf
{
s
}^{
[1]
}
,
\mathbf
{
t
}^{
[1]
}
)+c(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
;
\mathbf
{
s
}^{
[2]
}
,
\mathbf
{
t
}^{
[2]
}
)
}{
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}^{
[1]
}
,
\mathbf
{
t
}^{
[1]
}
) +
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}^{
[2]
}
,
\mathbf
{
t
}^{
[2]
}
)
}}
\nonumber
\\
&
=
&
\frac
{
4 + 1
}{
|
\mathbf
{
s
}^{
[1]
}
|
\times
|
\mathbf
{
t
}^{
[1]
}
| + |
\mathbf
{
s
}^{
[2]
}
|
\times
|
\mathbf
{
t
}^{
[2]
}
|
}
\nonumber
\\
&
=
&
\frac
{
4 + 1
}{
9
\times
7
+ 5
\times
7
}
\nonumber
\\
&
=
&
\frac
{
5
}{
98
}
&
=
&
\frac
{
4 + 1
}{
11
\times
11
+ 5
\times
7
}
\nonumber
\\
&
=
&
\frac
{
5
}{
156
}
\label
{
eq:3-5
}
\end{eqnarray}
}
...
...
Book/Chapter4/Figures/grid-search-2.tex
deleted
100644 → 0
查看文件 @
e10fac8e
\begin{tikzpicture}
\begin{scope}
[scale=0.62]
{
\tiny
\draw
[step=1,help lines,color=black]
(0,0) grid (4,4);
\node
[anchor=north]
(y2) at ([xshift=-3.3em,yshift=0em]n1.north)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at ([xshift=2em,yshift=-3em]n1.south)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r31) at (2,4)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r32) at (2,0)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r33) at (2,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r35) at (2,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,ugreen!50,fill=ugreen!50] (r34) at (2,3)
{}
;
\draw
[-,very thick,red!50, dashed] (1,2) -- (2,4) -- (3,2) -- (2,3) -- (1,2) -- (3,2) -- (2,1) -- (1,2) -- (2,0) -- (3,2);
\draw
[-,very thick,blue!50] (0,1) -- (1,2);
\draw
[-,very thick,blue!50] (3,2) -- (4,4);
\draw
[-,very thick,ugreen!50, dashed] (1,2) -- (2,3) -- (3,2);
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r11) at (0,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r12) at (1,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r14) at (3,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4)
{}
;
}
\end{scope}
\end{tikzpicture}
\ No newline at end of file
Book/Chapter4/Figures/grid-search
-1
.tex
→
Book/Chapter4/Figures/grid-search.tex
查看文件 @
bd87e7ad
...
...
@@ -3,13 +3,13 @@
{
\tiny
\draw
[step=1,help lines,color=black]
(0,0) grid (4,4);
\node
[anchor=north]
(y2) at (
[xshift=-3.3em,yshift=0em]n1.north
)
{
0.01
}
;
\node
[anchor=north]
(y2) at (
-5.3em,1.5
)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at (
[xshift=2em,yshift=-3em]n1.south
)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x1) at (
1em,-3em
)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
...
...
@@ -44,4 +44,45 @@
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4)
{}
;
}
\end{scope}
\begin{scope}
[scale=0.62,xshift=3in]
{
\tiny
\draw
[step=1,help lines,color=black]
(0,0) grid (4,4);
\node
[anchor=north]
(y2) at (-5.3em,1.5)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at (1em,-3em)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r31) at (2,4)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r32) at (2,0)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r33) at (2,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r35) at (2,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,ugreen!50,fill=ugreen!50] (r34) at (2,3)
{}
;
\draw
[-,very thick,red!50, dashed] (1,2) -- (2,4) -- (3,2) -- (2,3) -- (1,2) -- (3,2) -- (2,1) -- (1,2) -- (2,0) -- (3,2);
\draw
[-,very thick,blue!50] (0,1) -- (1,2);
\draw
[-,very thick,blue!50] (3,2) -- (4,4);
\draw
[-,very thick,ugreen!50, dashed] (1,2) -- (2,3) -- (3,2);
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r11) at (0,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r12) at (1,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r14) at (3,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4)
{}
;
}
\end{scope}
\end{tikzpicture}
\ No newline at end of file
Book/Chapter4/Figures/search-space-representation-of-feature-weight-1.tex
deleted
100644 → 0
查看文件 @
e10fac8e
\begin{tikzpicture}
\begin{scope}
[scale=0.55]
{
\tiny
\draw
[step=1,help lines,color=black]
grid (4,4);
\node
[anchor=north]
(y2) at ([xshift=-3.3em,yshift=0em]n1.north)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at ([xshift=2em,yshift=-3em]n1.south)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\draw
[decorate,decoration={brace}]
(0,4.7) --(4,4.7) node [xshift=-4em,yshift=1.5em,align=center](label1)
{
M dimensions
}
;
\draw
[decorate,decoration={brace}]
(4.5,4.3) --(4.5,0) node [xshift=2.3em,yshift=5.8em,align=center](label2)
{
Values
}
;
}
\end{scope}
\end{tikzpicture}
\ No newline at end of file
Book/Chapter4/Figures/search-space-representation-of-feature-weight-2.tex
deleted
100644 → 0
查看文件 @
e10fac8e
\begin{tikzpicture}
\begin{scope}
[scale=0.55]
{
\tiny
\draw
[step=1,help lines,color=black]
grid (4,4);
\node
[anchor=north]
(y2) at ([xshift=-3.3em,yshift=0em]n1.north)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at ([xshift=2em,yshift=-3em]n1.south)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r11) at (0,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r12) at (1,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r13) at (2,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r14) at (3,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4)
{}
;
\draw
[-,very thick,blue!50] (0,1) -- (1,2) -- (2,1) -- (3,2) -- (4,4);
\node
[anchor=north]
(p1) at ([xshift=5em,yshift=13em]n5.north)
{
\scriptsize
{$
\leftarrow
$
\textbf
{
path
}
:
}}
;
\node
[anchor=north]
(e1) at ([xshift=0,yshift=-0.4em]p1.south)
{$
w
_
1
=
0
.
01
$}
;
\node
[anchor=north]
(e2) at ([xshift=0,yshift=-0.8em]e1.south)
{$
w
_
2
=
0
.
02
$}
;
\node
[anchor=north]
(e3) at ([xshift=0,yshift=0.4em]e2.south)
{$
\vdots
$}
;
\node
[anchor=north]
(e4) at ([xshift=0,yshift=-0.2em]e3.south)
{$
w
_
M
=
1
.
00
$}
;
}
\end{scope}
\end{tikzpicture}
\ No newline at end of file
Book/Chapter4/Figures/search-space-representation-of-feature-weight
-3
.tex
→
Book/Chapter4/Figures/search-space-representation-of-feature-weight.tex
查看文件 @
bd87e7ad
...
...
@@ -3,13 +3,80 @@
{
\tiny
\draw
[step=1,help lines,color=black]
grid (4,4);
\node
[anchor=north]
(y2) at ([xshift=-3.3em,yshift=0em]n1.north)
{
0.01
}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\node
[anchor=north]
(y2) at (-5.3em,1.5)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at (1em,-3em)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[decorate,decoration={brace}]
(0,4.7) --(4,4.7) node [xshift=-4em,yshift=1.5em,align=center](label1)
{
M dimensions
}
;
\draw
[decorate,decoration={brace}]
(4.5,4.3) --(4.5,0) node [xshift=2.3em,yshift=5.8em,align=center](label2)
{
Values
}
;
}
\end{scope}
\begin{scope}
[scale=0.55,xshift=3.2in]
{
\tiny
\draw
[step=1,help lines,color=black]
grid (4,4);
\node
[anchor=north]
(y2) at (-5.3em,1.5)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at (1em,-3em)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
\node
[anchor=north]
(x5) at ([xshift=5em,yshift=0em]x4.north)
{$
\lambda
_
M
$}
;
\draw
[-](n1) (0,4) -- (0,4.4);
\draw
[-](n2) (1,4) -- (1,4.4);
\draw
[-](n3) (2,4) -- (2,4.4);
\draw
[-](n4) (3,4) -- (3,4.4);
\draw
[-](n5) (4,4) -- (4,4.4);
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r11) at (0,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r12) at (1,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r13) at (2,1)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r14) at (3,2)
{}
;
\node
[anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4)
{}
;
\draw
[-,very thick,blue!50] (0,1) -- (1,2) -- (2,1) -- (3,2) -- (4,4);
\node
[anchor=north]
(p1) at (5.7,4.3)
{
\scriptsize
{$
\leftarrow
$
\textbf
{
path
}
:
}}
;
\node
[anchor=north]
(e1) at ([xshift=0,yshift=-0.4em]p1.south)
{$
w
_
1
=
0
.
01
$}
;
\node
[anchor=north]
(e2) at ([xshift=0,yshift=-0.8em]e1.south)
{$
w
_
2
=
0
.
02
$}
;
\node
[anchor=north]
(e3) at ([xshift=0,yshift=0.4em]e2.south)
{$
\vdots
$}
;
\node
[anchor=north]
(e4) at ([xshift=0,yshift=-0.2em]e3.south)
{$
w
_
M
=
1
.
00
$}
;
}
\end{scope}
\begin{scope}
[scale=0.55,xshift=6.8in]
{
\tiny
\draw
[step=1,help lines,color=black]
grid (4,4);
\node
[anchor=north]
(y2) at (-5.3em,1.5)
{
0.01
}
;
\node
[anchor=north]
(y1) at ([xshift=0em,yshift=-3.3em]y2.south)
{
0.00
}
;
\node
[anchor=north]
(y3) at ([xshift=0em,yshift=4.5em]y2.north)
{
0.02
}
;
\node
[anchor=north]
(y4) at ([xshift=0em,yshift=6.6em]y3.north)
{$
\vdots
$}
;
\node
[anchor=north]
(y5) at ([xshift=0em,yshift=2em]y4.north)
{
1.00
}
;
\node
[anchor=north]
(x1) at (
[xshift=2em,yshift=-3em]n1.south
)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x1) at (
1em,-3em
)
{$
\lambda
_
1
$}
;
\node
[anchor=north]
(x2) at ([xshift=4.5em,yshift=0em]x1.north)
{$
\lambda
_
2
$}
;
\node
[anchor=north]
(x3) at ([xshift=4em,yshift=-1em]x2.north)
{$
...
$}
;
\node
[anchor=north]
(x4) at ([xshift=5em,yshift=1em]x3.north)
{$
\lambda
_{
M
-
1
}$}
;
...
...
Book/Chapter4/chapter4.tex
查看文件 @
bd87e7ad
...
...
@@ -701,9 +701,7 @@ dr = start_i-end_{i-1}-1
%----------------------------------------------
\begin{figure}
[htp]
\centering
\begin{tabular}
{
l l l
}
&
\subfigure
{
\input
{
./Chapter4/Figures/search-space-representation-of-feature-weight-1
}}
\subfigure
{
\input
{
./Chapter4/Figures/search-space-representation-of-feature-weight-2
}}
\subfigure
{
\input
{
./Chapter4/Figures/search-space-representation-of-feature-weight-3
}}
&
\\
\end{tabular}
\input
{
./Chapter4/Figures/search-space-representation-of-feature-weight
}
\caption
{
特征权重的搜索空间表示
}
\label
{
fig:4-23
}
\end{figure}
...
...
@@ -716,9 +714,7 @@ dr = start_i-end_{i-1}-1
%----------------------------------------------
\begin{figure}
[htp]
\centering
\begin{tabular}
{
l l
}
\subfigure
{
\input
{
./Chapter4/Figures/grid-search-1
}}
&
\subfigure
{
\input
{
./Chapter4/Figures/grid-search-2
}}
\\
\end{tabular}
\input
{
./Chapter4/Figures/grid-search
}
\caption
{
格搜索(左侧:所有点都访问(蓝色);右侧:避开无效点(绿色))
}
\label
{
fig:4-24
}
\end{figure}
...
...
Book/ChapterAppend/chapterappend.tex
查看文件 @
bd87e7ad
差异被折叠。
点击展开。
Book/mt-book-xelatex.idx
查看文件 @
bd87e7ad
差异被折叠。
点击展开。
Book/mt-book-xelatex.ptc
查看文件 @
bd87e7ad
差异被折叠。
点击展开。
Section03-Word-Based-Models/section03.tex
查看文件 @
bd87e7ad
差异被折叠。
点击展开。
Section05-Neural-Networks-and-Language-Modeling/section05.tex
查看文件 @
bd87e7ad
...
...
@@ -541,7 +541,7 @@ GPT-2 (Transformer) & Radford et al. & 2019 & \alert{35.7}
\end{itemize}
\item
<2->
\textbf
{
当然
}
,你是一个勇于实践的人
\begin{itemize}
\item
方法很简单:不断地尝试,根据结
构
不断地调整权重
\item
方法很简单:不断地尝试,根据结
果
不断地调整权重
\item
<10-> 在进行了很多次实验后,发现了相对好的一组权重
\end{itemize}
\end{itemize}
...
...
@@ -1034,7 +1034,7 @@ T(\alpha \textbf{a}) & = & \alpha T(\textbf{a}) \nonumber
\visible
<3->
{
\node
[anchor=center,fill=green!20] (w2) at (w)
{
\Large
{$
\textbf
{
w
}$}}
;
\node
[anchor=north,inner sep=1pt] (wlabel) at ([yshift=-0.7em]w.south)
{
\small
{
旋转(rotation)
}}
;
\node
[anchor=north,inner sep=1pt] (wlabel) at ([yshift=-0.7em]w.south)
{
\small
{
旋转(rotation)
、扩张(dilation)、挤压(squeeze)等
}}
;
\draw
[<-] ([yshift=-0.2em]w2.south) -- (wlabel.north);
\tikzstyle
{
neuron
}
= [rectangle,draw,thick,fill=red!30,red!35,minimum height=2em,minimum width=2em,font=
\small
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论