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
668ab330
Commit
668ab330
authored
May 05, 2020
by
zengxin
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'zengxin' 到 'caorunzhe'
chapter7 查看合并请求
!46
parents
7d4e3774
897b516e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
11 行删除
+17
-11
Book/Chapter7/Figures/figure-label-smoothing.tex
+17
-11
没有找到文件。
Book/Chapter7/Figures/figure-label-smoothing.tex
查看文件 @
668ab330
...
...
@@ -4,8 +4,8 @@
\node
[font=\scriptsize]
(model) at (0,0)
{
Model Output:
}
;
\node
[anchor=north west,font=\scriptsize]
(label
_
smooth) at ([yshift=-1.8em]model.south west)
{
Label Smoothing:
}
;
\node
[anchor=south west,font=\scriptsize]
(one-hot) at ([yshift=2em]model.north west)
{
One-hot:
}
;
\node
[anchor=west,minimum width=1
em,minimum height=0.2em,fill=ublue!80,inner sep=0pt] (model
_
label1) at ([xshift=2
em,yshift=-0.5em]model.east)
{}
;
%model out
\node
[anchor=west,minimum width=1
.2em,minimum height=0.2em,fill=ublue!80,inner sep=0pt] (model
_
label1) at ([xshift=1.5
em,yshift=-0.5em]model.east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (model
_
w1) at (model
_
label1.north)
{$
p
_{
1
}$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.1em,fill=ublue!80,inner sep=0pt] (model
_
label2) at (model
_
label1.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (model
_
w2) at (model
_
label2.north)
{$
p
_{
2
}$}
;
...
...
@@ -21,18 +21,24 @@
\node
[anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=ublue!80,inner sep=0pt] (model
_
label7) at (model
_
label6.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (model
_
w8) at (model
_
label7.north)
{$
p
_{
7
}$}
;
%no label smooth
\node
[anchor=west,minimum width=1.2em,minimum height=0em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label1) at ([xshift=2em,yshift=3em]model.east)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label2) at (one
_
hot
_
label1.south east)
{$
0
$}
;
\node
[anchor=west,minimum width=1.2em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label1) at ([xshift=1.5em,yshift=3em]model.east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w1) at (one
_
hot
_
label1.north)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label2) at (one
_
hot
_
label1.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w2) at (one
_
hot
_
label2.north)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=1.5em,fill=orange!50,inner sep=0pt] (one
_
hot
_
label3) at (one
_
hot
_
label2.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w3) at (one
_
hot
_
label3.north)
{{
\color
{
red
}
$
1
$}}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label4) at (one
_
hot
_
label3.south east)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label4) at (one
_
hot
_
label3.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w4) at (one
_
hot
_
label4.north)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.1em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label5) at (one
_
hot
_
label4.south east)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.3em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label6) at (one
_
hot
_
label5.south east)
{$
0
$}
;
\node
[anchor=south west,minimum width=1em,minimum height=0.4em,inner sep=0pt,font=
\scriptsize
] (one
_
hot
_
label7) at (one
_
hot
_
label6.south east)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label5) at (one
_
hot
_
label4.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w5) at (one
_
hot
_
label5.north)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label6) at (one
_
hot
_
label5.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w6) at (one
_
hot
_
label6.north)
{$
0
$}
;
\node
[anchor=south west,minimum width=1.12em,minimum height=0.05em,fill=orange!50,inner sep=0pt,font=
\tiny
] (one
_
hot
_
label7) at (one
_
hot
_
label6.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (one
_
hot
_
w7) at (one
_
hot
_
label7.north)
{$
0
$}
;
%label smoothing
\node
[anchor=west,minimum width=1
em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label1) at ([xshift=2
em,yshift=-3.2em]model.east)
{}
;
\node
[anchor=west,minimum width=1
.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label1) at ([xshift=1.5
em,yshift=-3.2em]model.east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (w1) at (label1.north)
{$
0
.
1
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label2) at (label1.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (w2) at (label2.north)
{$
0
.
1
$}
;
...
...
@@ -47,7 +53,7 @@
\node
[anchor=south,font=
\scriptsize
] (w7) at (label6.north)
{$
0
.
1
$}
;
\node
[anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label7) at (label6.south east)
{}
;
\node
[anchor=south,font=
\scriptsize
] (w8) at (label7.north)
{$
0
.
1
$}
;
\node
[font=\scriptsize]
(line1) at ([xshift=9em,yshift=-1.5em]model
_
label7.east)
{$
loss
=-
0
.
3
\log
p
_{
3
}
-
\sum
_{
i
=
1
}^{
7
}
0
.
1
\log
p
_{
i
}$}
;
\node
[font=\scriptsize]
(line2) at ([xshift=5.9em,yshift=3.5em]model
_
label7.east)
{$
loss
=-
\log
p
_{
3
}$}
;
...
...
@@ -57,7 +63,7 @@
\node
[rectangle,inner sep=0.2em,rounded corners=1pt,fill=purple!10,drop shadow,draw=purple] [fit = (line2)] (box3)
{}
;
\draw
[->,dotted,very thick,red] ([yshift=-1em]box1.east) .. controls +(east:1) and +(west:1) .. (box3.west);
\node
[rectangle,inner sep=0.1em,rounded corners=1pt,very thick,dotted,draw=ugreen] [fit = (label1) (label7) (model
_
label1) (model
_
label7) (model
_
w3)] (box2)
{}
;
\node
[rectangle,inner sep=0.2em,rounded corners=1pt,fill=green!10,drop shadow,draw=ugreen] [fit = (line1)] (box4)
{}
;
\draw
[->,dotted,very thick,ugreen] ([yshift=1em]box2.east) .. controls +(east:1) and +(west:1) .. (box4.west);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论