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
3d57d2a0
Commit
3d57d2a0
authored
Dec 28, 2020
by
孟霞
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'mengxia' 到 'caorunzhe'
Mengxia 查看合并请求
!726
parents
64600e61
abd366de
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
87 行增加
和
39 行删除
+87
-39
Chapter9/Figures/figure-activate.tex
+9
-9
Chapter9/Figures/figure-bias.tex
+9
-3
Chapter9/Figures/figure-broadcast.tex
+3
-3
Chapter9/Figures/figure-embedding-matrix.tex
+2
-2
Chapter9/Figures/figure-embedding.tex
+2
-2
Chapter9/Figures/figure-fit.tex
+14
-0
Chapter9/Figures/figure-piecewise.tex
+4
-0
Chapter9/Figures/figure-save.tex
+5
-5
Chapter9/Figures/figure-translation.tex
+15
-9
Chapter9/Figures/figure-w1.tex
+9
-3
Chapter9/Figures/figure-w2.tex
+6
-0
Chapter9/Figures/figure-weight.tex
+9
-3
Chapter9/chapter9.tex
+0
-0
没有找到文件。
Chapter9/Figures/figure-activate.tex
查看文件 @
3d57d2a0
...
...
@@ -6,7 +6,7 @@
\foreach
\x
in
{
-1.0,-0.5,0.0,0.5,1.0
}{
\draw
(
\x
,0)--(
\x
,0.05)node[below,outer sep=2pt,font=
\scriptsize
]at(
\x
,0)
{
\x
}
;
}
\foreach
\y
in
{
1.0,0.5
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(0,
\y
)
{
\y
}
;
}
\draw
[color=red ,domain=-1.4:1, line width=1pt]
plot(
\x
,
{
ln(1+(exp(
\x
))
}
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
\ln
(
1
+
{
\textrm
e
}^
x
)
$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
\ln
(
1
+
{
\textrm
e
}^
x
)
$}
;
\node
[anchor=south east,inner sep=1pt] (labela) at (0.8,-2)
{
\small
{
(a) Softplus
}}
;
\end{scope}
...
...
@@ -21,7 +21,7 @@
\pgfmathresult
}
;
}
\foreach
\y
in
{
0.5,1.0
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(-0.15,
\y
)
{
\y
}
;
}
\draw
[color=red,domain=-1.4:1.4, line width=1pt]
plot(
\x
,
{
1/(1+(exp(-5*
\x
)))
}
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
\frac
{
1
}{
1
+
{
\textrm
e
}^{
-
x
}}$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
\frac
{
1
}{
1
+
{
\textrm
e
}^{
-
x
}}$}
;
\node
[anchor=south east,inner sep=1pt] (labelb) at (0.8,-2)
{
\small
{
(b) Sigmoid
}}
;
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
...
...
@@ -34,41 +34,41 @@
\foreach
\x
in
{
-1.0,-0.5,0.0,0.5,1.0
}{
\draw
(
\x
,0)--(
\x
,0.05)node[below,outer sep=2pt,font=
\scriptsize
]at(
\x
,0)
{
\x
}
;
}
\foreach
\y
in
{
,-1.0-0.5,0.5,1.0
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(0,
\y
)
{
\y
}
;
}
\draw
[color=red ,domain=-1.4:1.4, line width=1pt]
plot(
\x
,
{
tanh(
\x
)
}
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
\frac
{{
\textrm
e
}^{
x
}
-
{
\textrm
e
}^{
-
x
}}{{
e
}^{
x
}
+
e
^{
-
x
}}$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
\frac
{{
\textrm
e
}^{
x
}
-
{
\textrm
e
}^{
-
x
}}{{
e
}^{
x
}
+
e
^{
-
x
}}$}
;
\node
[anchor=south east,inner sep=1pt] (labelc) at (0.8,-2)
{
\small
{
(c) Tanh
}}
;
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}
[yshift=-1.
7
in]
\begin{scope}
[yshift=-1.
8
in]
\draw
[->, line width=1pt]
(-1.4,0)--(1.4,0)node[left,below,font=
\scriptsize
]
{$
x
$}
;
\draw
[->, line width=1pt]
(0,-1.4)--(0,1.4)node[right,font=
\scriptsize
]
{$
y
$}
;
\foreach
\x
in
{
-1.0,-0.5,0.0,0.5,1.0
}{
\draw
(
\x
,0)--(
\x
,0.05)node[below,outer sep=2pt,font=
\scriptsize
]at(
\x
,0)
{
\x
}
;
}
\foreach
\y
in
{
0.5,1.0
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(0,
\y
)
{
\y
}
;
}
\draw
[color=red ,domain=-1.4:1.4, line width=1pt]
plot(
\x
,
{
max(
\x
,0)
}
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
\max
(
0
, x
)
$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
\max
(
0
, x
)
$}
;
\node
[anchor=south east,inner sep=1pt] (labeld) at (0.8,-2)
{
\small
{
(d) ReLU
}}
;
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}
[yshift=-1.
7
in,xshift=1.6in]
\begin{scope}
[yshift=-1.
8
in,xshift=1.6in]
\draw
[->, line width=1pt]
(-1.4,0)--(1.4,0)node[left,below,font=
\scriptsize
]
{$
x
$}
;
\draw
[->, line width=1pt]
(0,-1.4)--(0,1.4)node[right,font=
\scriptsize
]
{$
y
$}
;
\foreach
\x
in
{
-1.0,-0.5,0.0,0.5,1.0
}{
\draw
(
\x
,0)--(
\x
,0.05)node[below,outer sep=2pt,font=
\scriptsize
]at(
\x
,0)
{
\x
}
;
}
\foreach
\y
in
{
0.5,1.0
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(-0.15,
\y
)
{
\y
}
;
}
\draw
[color=red ,domain=-1.4:1.4, line width=1pt]
plot(
\x
,
{
exp(-1*((
\x
)
^
2))
}
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
e
^{
-
x
^
2
}$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
e
^{
-
x
^
2
}$}
;
\node
[anchor=south east,inner sep=1pt] (labele) at (0.8,-2)
{
\small
{
(e) Gaussian
}}
;
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}
[yshift=-1.
7
in,xshift=3.2in]
\begin{scope}
[yshift=-1.
8
in,xshift=3.2in]
\draw
[->, line width=1pt]
(-1.4,0)--(1.4,0)node[left,below,font=
\scriptsize
]
{$
x
$}
;
\draw
[->, line width=1pt]
(0,-1.4)--(0,1.4)node[right,font=
\scriptsize
]
{$
y
$}
;
\foreach
\x
in
{
-1.0,-0.5,0.0,0.5,1.0
}{
\draw
(
\x
,0)--(
\x
,0.05)node[below,outer sep=2pt,font=
\scriptsize
]at(
\x
,0)
{
\x
}
;
}
\foreach
\y
in
{
0.5,1.0
}{
\draw
(0,
\y
)--(0.05,
\y
)node[left,outer sep=2pt,font=
\scriptsize
]at(0,
\y
)
{
\y
}
;
}
\draw
[color=red ,domain=-1:1, line width=1pt]
plot(
\x
,
\x
);
\node
[black,anchor=south]
at (0,1.
4
)
{
\small
$
y
=
x
$}
;
\node
[black,anchor=south]
at (0,1.
6
)
{
\small
$
y
=
x
$}
;
\node
[anchor=south east,inner sep=1pt] (labelf) at (0.8,-2)
{
\small
{
(f) Identity
}}
;
\end{scope}
\end{tikzpicture}
...
...
Chapter9/Figures/figure-bias.tex
查看文件 @
3d57d2a0
...
...
@@ -5,12 +5,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labela) at (0.2,-0.5)
{
\small
{
(a)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0,0) -- (0,1) -- (1.5,1);
}
\end{scope}
%---------------------------------------------------------------------------------------------
...
...
@@ -18,12 +20,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelb) at (0.2,-0.5)
{
\small
{
(b)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
2
$}}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
2
$}}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.25,0) -- (0.25,1) -- (1.5,1);
}
\end{scope}
%-----------------------------------------------------------------------------------------------
...
...
@@ -31,12 +35,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelc) at (0.2,-0.5)
{
\small
{
(c)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
4
$}}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
4
$}}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,1) -- (1.5,1);
}
\end{scope}
\end{tikzpicture}
...
...
Chapter9/Figures/figure-broadcast.tex
查看文件 @
3d57d2a0
...
...
@@ -9,7 +9,7 @@
\addtocounter
{
mycount1
}{
1
}
;
}
\node
[anchor=south] (varlabel) at (0,0.6)
{$
\mathbi
{
s
}$}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(a)
}}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(a)
张量
$
\mathbi
{
s
}$
}}
;
\end{scope}
\begin{scope}
[xshift=2.1in]
...
...
@@ -21,7 +21,7 @@
\addtocounter
{
mycount1
}{
1
}
;
}
\node
[anchor=south] (varlabel) at (0,0.1)
{$
\mathbi
{
b
}$}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(b)
}}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(b)
张量
$
\mathbi
{
b
}$
}}
;
\end{scope}
...
...
@@ -51,7 +51,7 @@
}
\node
[anchor=center] (plabel) at (-4.5em,0)
{
\huge
{$
\mathbf
{
+
}$}}
;
\node
[anchor=south] (varlabel) at (0,0.6)
{$
\mathbi
{
b
}$}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(c)
}}
;
\node
[anchor=north] (labelc) at (0,-0.7)
{
\small
{
(c)
张量的单元加运算
}}
;
\end{scope}
\begin{scope}
[yshift=-1in,xshift=3in]
\setcounter
{
mycount1
}{
2
}
...
...
Chapter9/Figures/figure-embedding-matrix.tex
查看文件 @
3d57d2a0
...
...
@@ -9,12 +9,12 @@
\end{pgfonlayer}
\draw
[->,thick] ([yshift=-1em]box.south)--([yshift=-0.1em]box.south) node [pos=0,below] (bottom1)
{
\small
{
单词
$
w
$
的One-hot表示
}}
;
\draw
[->,thick] ([yshift=0.1em]box.north)--([yshift=1em]box.north) node [pos=1,above] (top1)
{
\scriptsize
{$
\mathbi
{
e
}$
=(8,
.2,-1,
.9,...,1)
}}
;
\draw
[->,thick] ([yshift=0.1em]box.north)--([yshift=1em]box.north) node [pos=1,above] (top1)
{
\scriptsize
{$
\mathbi
{
e
}$
=(8,
0.2,-1,0
.9,...,1)
}}
;
\node
[anchor=north] (bottom2) at ([yshift=0.3em]bottom1.south)
{
\scriptsize
{$
\mathbi
{
o
}$
=(0,0,1,0,...,0)
}}
;
\node
[anchor=south] (top2) at ([yshift=-0.3em]top1.north)
{
\small
{
单词
$
w
$
的分布式表示
}}
;
{
\node
[anchor=north west,fill=red!20!white] (cmatrix) at ([xshift=3em,yshift=1.0em]c.north east)
{
\scriptsize
{$
\begin
{
pmatrix
}
1
&
.
2
&
-
.
2
&
8
&
...
&
0
\\
.
6
&
.
8
&
-
2
&
1
&
...
&
-
.
2
\\
8
&
.
2
&
-
1
&
.
9
&
...
&
2
.
3
\\
1
&
1
.
2
&
-
.
9
&
3
&
...
&
.
2
\\
...
&
...
&
...
&
...
&
...
&
...
\\
1
&
.
3
&
3
&
.
9
&
...
&
5
.
1
\end
{
pmatrix
}$}}
;
\node
[anchor=north west,fill=red!20!white] (cmatrix) at ([xshift=3em,yshift=1.0em]c.north east)
{
\scriptsize
{$
\begin
{
pmatrix
}
1
&
0
.
2
&
-
0
.
2
&
8
&
...
&
0
\\
0
.
6
&
0
.
8
&
-
2
&
1
&
...
&
-
0
.
2
\\
8
&
0
.
2
&
-
1
&
0
.
9
&
...
&
2
.
3
\\
1
&
1
.
2
&
-
0
.
9
&
3
&
...
&
0
.
2
\\
...
&
...
&
...
&
...
&
...
&
...
\\
1
&
0
.
3
&
3
&
0
.
9
&
...
&
5
.
1
\end
{
pmatrix
}$}}
;
\node
[anchor=west,inner sep=2pt,fill=red!30!white] (c) at (e.east)
{
\small
{$
\mathbi
{
C
}$}}
;
\draw
[<-,thick] (c.east) -- ([xshift=3em]c.east);
}
...
...
Chapter9/Figures/figure-embedding.tex
查看文件 @
3d57d2a0
...
...
@@ -2,8 +2,8 @@
\begin{tikzpicture}
{
\begin{scope}
[xshift=2in]
\node
[anchor=north west] (o1) at (0,0)
{
\footnotesize
{$
\begin
{
bmatrix
}
.
1
\\
-
1
\\
2
\\
...
\\
0
\end
{
bmatrix
}$}}
;
\node
[anchor=north west] (o2) at ([xshift=1em]o1.north east)
{
\footnotesize
{$
\begin
{
bmatrix
}
1
\\
2
\\
.
2
\\
...
\\
-
1
\end
{
bmatrix
}$}}
;
\node
[anchor=north west] (o1) at (0,0)
{
\footnotesize
{$
\begin
{
bmatrix
}
0
.
1
\\
-
1
\\
2
\\
...
\\
0
\end
{
bmatrix
}$}}
;
\node
[anchor=north west] (o2) at ([xshift=1em]o1.north east)
{
\footnotesize
{$
\begin
{
bmatrix
}
1
\\
2
\\
0
.
2
\\
...
\\
-
1
\end
{
bmatrix
}$}}
;
\node
[anchor=north east] (v) at ([xshift=-0em]o1.north west)
{
\footnotesize
{$
\begin
{
matrix
}
\textrm
{
\ \ \
属性
}_
1
\\
\textrm
{
\ \ \
属性
}_
2
\\
\textrm
{
\ \ \
属性
}_
3
\\
...
\\
\textrm
{
属性
}_{
512
}
\end
{
matrix
}$}}
;
\node
[anchor=south] (w1) at (o1.north)
{
\footnotesize
{
桌子
}}
;
\node
[anchor=south] (w2) at (o2.north)
{
\footnotesize
{
椅子
}}
;
...
...
Chapter9/Figures/figure-fit.tex
查看文件 @
3d57d2a0
...
...
@@ -61,6 +61,8 @@
{
\draw
[->,thick] (-1.6,0) -- (1.6,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.45,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
...
...
@@ -72,6 +74,10 @@
{
\draw
[->,thick] (-1.6,0) -- (1.6,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.45,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\node
[anchor=east,inner sep=1pt] (label1) at (0,0.85)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\draw
[-,very thick,red,domain=-1.5:1.5,samples=100] plot (
\x
,
{
0.2 * (
\x
+0.4)
^
3 + 1.2 - 0.3 *(
\x
+ 0.8)
^
2
}
);
}
{
...
...
@@ -153,6 +159,10 @@
\begin{scope}
[xshift=2.1in,yshift=0.1in]
\draw
[->,thick] (-1.6,0) -- (1.6,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.45,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,0.7) -- (0.7,0.7) -- (0.7,0) -- (1.5,0);
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.7,0) -- (0.7,0.6) -- (0.9,0.6) -- (0.9,0) -- (1.5,0);
}
...
...
@@ -163,6 +173,10 @@
{
\draw
[->,thick] (-1.6,0) -- (1.6,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.45,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\node
[anchor=east,inner sep=1pt] (label1) at (0,0.85)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\draw
[-,very thick,red,domain=-1.5:1.5,samples=100] plot (
\x
,
{
0.2 * (
\x
+0.4)
^
3 + 1.2 - 0.3 *(
\x
+ 0.8)
^
2
}
);
}
\foreach
\n
in
{
0.5
}{
...
...
Chapter9/Figures/figure-piecewise.tex
查看文件 @
3d57d2a0
...
...
@@ -9,6 +9,8 @@
{
\draw
[->,thick] (-2.2,0) -- (2.2,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.95,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=north,inner sep=1pt] (labelb) at (0,-0.2)
{
\small
{
(b)
}}
;
}
...
...
@@ -32,6 +34,8 @@
{
\draw
[->,thick] (-2.2,0) -- (2.2,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.95,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1.18)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
...
...
Chapter9/Figures/figure-save.tex
查看文件 @
3d57d2a0
...
...
@@ -7,7 +7,7 @@
\node
[fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm](vector1) at (
\x
,0.25)
{$
\number\value
{
mycount
1
}$}
;
\addtocounter
{
mycount1
}{
1
}
;
}
\node
[anchor=north] (labela) at ([xshift=-1.2em,yshift=-0
em]vector1.south)
{
\small
{
(a)
}}
;
\node
[anchor=north] (labela) at ([xshift=-1.2em,yshift=-0
.3em]vector1.south)
{
\small
{
(a)1阶张量
}}
;
\end{scope}
\begin{scope}
[xshift=1.2in]
...
...
@@ -21,7 +21,7 @@
\node
[fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (
\x
,0.25)
{$
\number\value
{
mycount
2
}$}
;
\addtocounter
{
mycount2
}{
1
}
;
}
\node
[anchor=north] (labelb) at ([xshift=0.3em,yshift=-0
em]vector2.south)
{
\small
{
(b)
}}
;
\node
[anchor=north] (labelb) at ([xshift=0.3em,yshift=-0
.3em]vector2.south)
{
\small
{
(b)2阶张量
}}
;
\end{scope}
\begin{scope}
[yshift=-0.6in]
...
...
@@ -45,9 +45,9 @@
}
\draw
[decorate,thick,decoration={brace,mirror,raise=0.2em}]
(0,-0.2) -- (2.95,-0.2);
\draw
[decorate,thick,decoration={brace,mirror,raise=0.2em}]
(3.05,-0.2) -- (6,-0.2);
\node
[anchor=north] (subtensor1) at (1.5,-0.4)
{
\footnotesize
{$
3
\times
2
$
sub-tensor
}}
;
\node
[anchor=north] (subtensor1) at (4.5,-0.4)
{
\footnotesize
{$
3
\times
2
$
sub-tensor
}}
;
\node
[anchor=north] (labelc) at (3,-
0.8)
{
\small
{
(c)
}}
;
\node
[anchor=north] (subtensor1) at (1.5,-0.4)
{
\footnotesize
{$
3
\times
2
$
子张量
}}
;
\node
[anchor=north] (subtensor1) at (4.5,-0.4)
{
\footnotesize
{$
3
\times
2
$
子张量
}}
;
\node
[anchor=north] (labelc) at (3,-
1.1)
{
\small
{
(c)1阶张量
}}
;
\end{scope}
\end{tikzpicture}
...
...
Chapter9/Figures/figure-translation.tex
查看文件 @
3d57d2a0
...
...
@@ -5,9 +5,11 @@
\node
[neuron,anchor=north]
(a1) at (0,0)
{}
;
\draw
[->,thick]
([xshift=-2em,yshift=0em]a1.south) to ([xshift=3em,yshift=0em]a1.south);
\draw
[->,thick]
([xshift=0em,yshift=-4em]a1.west) to ([xshift=0em,yshift=2em]a1.west);
\node
[below]
at ([xshift=0.5em,yshift=-1em]a1.west)
{
0
}
;
\node
[below]
at ([xshift=2em,yshift=-1em]a1.west)
{
1
}
;
\node
[below]
at ([xshift=-0.5em,yshift=2em]a1.west)
{
1
}
;
\node
[anchor=south] (heng1) at ([xshift=2.5em,yshift=-0.8em]a1.south)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=west] (zong1) at ([xshift=-1em,yshift=1.8em]a1.west)
{
\scriptsize
{$
y
$}}
;
\node
[below]
at ([xshift=0.5em,yshift=-1em]a1.west)
{
\footnotesize
{
0
}}
;
\node
[below]
at ([xshift=2em,yshift=-1em]a1.west)
{
\footnotesize
{
1
}}
;
\node
[below]
at ([xshift=-0.5em,yshift=1.5em]a1.west)
{
\footnotesize
{
1
}}
;
\node
[anchor=west] (x) at ([xshift=-0.7em,yshift=1em]a1.south)
{
\Large
{$
\textbf
{
F
}$}}
;
{
...
...
@@ -15,9 +17,11 @@
\node
[neuron,anchor=north]
(a2) at ([xshift=10em,yshift=0em]a1.south)
{}
;
\draw
[->,thick]
([xshift=-2em,yshift=0em]a2.north) to ([xshift=3em,yshift=0em]a2.north);
\draw
[->,thick]
([xshift=0em,yshift=-2em]a2.west) to ([xshift=0em,yshift=4em]a2.west);
\node
[above]
at ([xshift=0.5em,yshift=1em]a2.west)
{
0
}
;
\node
[above]
at ([xshift=2em,yshift=1em]a2.west)
{
1
}
;
\node
[below]
at ([xshift=-0.5em,yshift=0em]a2.west)
{
-1
}
;
\node
[anchor=south] (heng1) at ([xshift=2.5em,yshift=1.25em]a2.south)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=west] (zong1) at ([xshift=-1em,yshift=3.85em]a2.west)
{
\scriptsize
{$
y
$}}
;
\node
[above]
at ([xshift=0.5em,yshift=1em]a2.west)
{
\footnotesize
{
0
}}
;
\node
[above]
at ([xshift=2em,yshift=1em]a2.west)
{
\footnotesize
{
1
}}
;
\node
[below]
at ([xshift=-0.5em,yshift=0em]a2.west)
{
\footnotesize
{
-1
}}
;
\node
[anchor=west] (x) at ([xshift=-3.5cm,yshift=2em]a2.north)
{
\scriptsize
{
$
\mathbi
{
W
}
=
\begin
{
pmatrix
}
1
&
0
&
0
\\
...
...
@@ -37,9 +41,11 @@
\node
[neuron,anchor=north]
(a3) at ([xshift=11em,yshift=2.05em]a2.south)
{}
;
\draw
[->,thick]
([xshift=-3em,yshift=0em]a3.north) to ([xshift=2em,yshift=0em]a3.north);
\draw
[->,thick]
([xshift=-1em,yshift=-2em]a3.west) to ([xshift=-1em,yshift=4em]a3.west);
\node
[above]
at ([xshift=-0.5em,yshift=1em]a3.west)
{
0
}
;
\node
[above]
at ([xshift=1em,yshift=1em]a3.west)
{
1
}
;
\node
[left]
at ([xshift=-0.75em,yshift=-0.5em]a3.west)
{
-1
}
;
\node
[anchor=south] (heng1) at ([xshift=1.5em,yshift=1.2em]a3.south)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=west] (zong1) at ([xshift=-2em,yshift=3.8em]a3.west)
{
\scriptsize
{$
y
$}}
;
\node
[above]
at ([xshift=-0.5em,yshift=1em]a3.west)
{
\footnotesize
{
0
}}
;
\node
[above]
at ([xshift=1em,yshift=1em]a3.west)
{
\footnotesize
{
1
}}
;
\node
[left]
at ([xshift=-0.75em,yshift=-0.5em]a3.west)
{
\footnotesize
{
-1
}}
;
\node
[anchor=west,rotate = 180] (x) at ([xshift=0.7em,yshift=1em]a3.south)
{
\Large
{$
\textbf
{
F
}$}}
;
...
...
Chapter9/Figures/figure-w1.tex
查看文件 @
3d57d2a0
...
...
@@ -5,12 +5,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labela) at (0.2,-0.5)
{
\small
{
(a)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
4
$}}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}
\\
[-0ex]
{
\scriptsize
{
\
$
b
_
1
=-
4
$}}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,1) -- (1.5,1);
}
\end{scope}
%---------------------------------------------------------------------------------------------
...
...
@@ -18,12 +20,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelb) at (0.2,-0.5)
{
\small
{
(b)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{{
\scriptsize
{
\
$
w'
_{
11
}
=
0
.
9
$}}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{{
\scriptsize
{
\
$
w'
_{
11
}
=
0
.
9
$}}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.8,0) -- (0.5,0) -- (0.5,0.9) -- (1.8,0.9);
}
\end{scope}
%-----------------------------------------------------------------------------------------------
...
...
@@ -32,12 +36,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelc) at (0.2,-0.5)
{
\small
{
(c)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{{
\scriptsize
{
\
$
w'
_{
11
}
=
0
.
7
$}}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{{
\scriptsize
{
\
$
w'
_{
11
}
=
0
.
7
$}}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,0.7) -- (1.5,0.7);
}
\end{scope}
...
...
Chapter9/Figures/figure-w2.tex
查看文件 @
3d57d2a0
...
...
@@ -5,6 +5,8 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
...
...
@@ -18,6 +20,8 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
...
...
@@ -32,6 +36,8 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
...
...
Chapter9/Figures/figure-weight.tex
查看文件 @
3d57d2a0
...
...
@@ -5,12 +5,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labela) at (0.2,-0.5)
{
\small
{
(a)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
1
$}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{
\scriptsize
{
\
$
w
_{
11
}
=
1
$}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\draw
[-,very thick,ublue,domain=-1.5:1.5,samples=100] plot (
\x
,
{
1/(1+exp(-2*
\x
))
}
);
}
\end{scope}
%---------------------------------------------------------------------------------------------
...
...
@@ -19,11 +21,13 @@
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelb) at (0.2,-0.5)
{
\small
{
(b)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
10
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
10
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\draw
[-,very thick,ublue,domain=-1.5:1.5,samples=100] plot (
\x
,
{
1/(1+exp(-4*
\x
))
}
);
}
\end{scope}
%-----------------------------------------------------------------------------------------------
...
...
@@ -31,12 +35,14 @@
{
\draw
[->,thick] (-1.8,0) -- (1.8,0);
\draw
[->,thick] (0,0) -- (0,2);
\node
[anchor=south] (heng1) at (1.6,-0.35)
{
\scriptsize
{$
x
$}}
;
\node
[anchor=south] (zong1) at (-0.2,1.6)
{
\scriptsize
{$
y
$}}
;
\draw
[-] (-0.05,1) -- (0.05,1);
\node
[anchor=east,inner sep=1pt] (label1) at (0,1)
{
\tiny
{
1
}}
;
\node
[anchor=south east,inner sep=1pt] (label2) at (0,0)
{
\tiny
{
0
}}
;
\node
[anchor=south east,inner sep=1pt] (labelc) at (0.2,-0.5)
{
\small
{
(c)
}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
1.8
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\node
[anchor=north west,align=left] (wblabel) at (-
2
,2)
{{
\scriptsize
{
\
$
w
_{
11
}
=
100
$}}
\\
[-0ex]
\scriptsize
{
\
$
b
_
1
=
0
$}}
;
}
{
\draw
[-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0,0) -- (0,1) -- (1.5,1);
}
\end{scope}
\end{tikzpicture}
...
...
Chapter9/chapter9.tex
查看文件 @
3d57d2a0
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论