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
单韦乔
Toy-MT-Introduction
Commits
7f78e16e
Commit
7f78e16e
authored
Oct 27, 2019
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new pages
parent
7c79a698
全部展开
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
95 行增加
和
9 行删除
+95
-9
Section05-Neural-Networks-and-Language-Modeling/section05-test.tex
+95
-9
Section05-Neural-Networks-and-Language-Modeling/section05.tex
+0
-0
没有找到文件。
Section05-Neural-Networks-and-Language-Modeling/section05-test.tex
查看文件 @
7f78e16e
...
...
@@ -120,17 +120,103 @@
\subsection
{
词嵌入
}
%%%------------------------------------------------------------------------------------------------------------
%%%
用实例理解词的分布式表示
\begin{frame}
{
分布式表示的可视化
}
%%%
上下文表示模型
\begin{frame}
{
表示更长的片段 - 上下文表示模型
}
\begin{itemize}
\item
\textbf
{
一个著名的例子
}
:国王
$
\to
$
王后
\\
\begin{displaymath}
\vv
{
\textrm
{
国王
}}
-
\vv
{
\textrm
{
男人
}}
+
\vv
{
\textrm
{
女人
}}
=
\vv
{
\textrm
{
王后
}}
\end{displaymath}
这里,
$
\vv
{
\textrm
{
word
}}$
表示单词的分布式向量表示
\item
更多的词的可视化:相似的词聚在一起
\item
在语言模型中已经包含了每个位置的上下文表示信息
\begin{itemize}
\item
以RNN LM为例,位置
$
i
$
的隐层输出就是一种
$
w
_
1
...w
_
i
$
的表示
\end{itemize}
\end{itemize}
\vspace
{
-0.5em
}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
rnnnode
}
= [draw,inner sep=5pt,minimum width=4em,minimum height=1.5em,fill=green!30!white,blur shadow=
{
shadow xshift=1pt,shadow yshift=-1pt
}
]
\node
[anchor=west,rnnnode] (node11) at (0,0)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=west,rnnnode] (node12) at ([xshift=2em]node11.east)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=west,rnnnode] (node13) at ([xshift=2em]node12.east)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=west,rnnnode] (node14) at ([xshift=2em]node13.east)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=north,rnnnode,fill=red!30!white] (e1) at ([yshift=-1.2em]node11.south)
{
\scriptsize
{
embedding
}}
;
\node
[anchor=north,rnnnode,fill=red!30!white] (e2) at ([yshift=-1.2em]node12.south)
{
\scriptsize
{
embedding
}}
;
\node
[anchor=north,rnnnode,fill=red!30!white] (e3) at ([yshift=-1.2em]node13.south)
{
\scriptsize
{
embedding
}}
;
\node
[anchor=north,rnnnode,fill=red!30!white] (e4) at ([yshift=-1.2em]node14.south)
{
\scriptsize
{
embedding
}}
;
\node
[anchor=north] (w1) at ([yshift=-1em]e1.south)
{
\footnotesize
{
乔布斯
}}
;
\node
[anchor=north] (w2) at ([yshift=-1em]e2.south)
{
\footnotesize
{
任职
}}
;
\node
[anchor=north] (w3) at ([yshift=-1em]e3.south)
{
\footnotesize
{
于
}}
;
\node
[anchor=north] (w4) at ([yshift=-1em]e4.south)
{
\footnotesize
{
苹果
}}
;
\draw
[->,thick] ([yshift=0.1em]w1.north)--([yshift=-0.1em]e1.south);
\draw
[->,thick] ([yshift=0.1em]w2.north)--([yshift=-0.1em]e2.south);
\draw
[->,thick] ([yshift=0.1em]w3.north)--([yshift=-0.1em]e3.south);
\draw
[->,thick] ([yshift=0.1em]w4.north)--([yshift=-0.1em]e4.south);
\draw
[->,thick] ([yshift=0.1em]e1.north)--([yshift=-0.1em]node11.south);
\draw
[->,thick] ([yshift=0.1em]e2.north)--([yshift=-0.1em]node12.south);
\draw
[->,thick] ([yshift=0.1em]e3.north)--([yshift=-0.1em]node13.south);
\draw
[->,thick] ([yshift=0.1em]e4.north)--([yshift=-0.1em]node14.south);
\node
[anchor=south,rnnnode] (node21) at ([yshift=1.5em]node11.north)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=south,rnnnode] (node22) at ([yshift=1.5em]node12.north)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=south,rnnnode] (node23) at ([yshift=1.5em]node13.north)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=south,rnnnode] (node24) at ([yshift=1.5em]node14.north)
{
\scriptsize
{
RNN Cell
}}
;
\node
[anchor=south] (node31) at ([yshift=1.0em]node21.north)
{
\scriptsize
{
的表示
}}
;
\node
[anchor=south west] (node31new) at ([yshift=-0.3em]node31.north west)
{
\scriptsize
{
``乔布斯''
}}
;
\node
[anchor=south] (node32) at ([yshift=1.0em]node22.north)
{
\scriptsize
{
的表示
\ \ \
}}
;
\node
[anchor=south west] (node32new) at ([yshift=-0.3em]node32.north west)
{
\scriptsize
{
``乔布斯 任职''
}}
;
\node
[anchor=south] (node33) at ([yshift=1.0em]node23.north)
{
\scriptsize
{
的表示
\ \ \ \ \ \ \ \
}}
;
\node
[anchor=south west] (node33new) at ([yshift=-0.3em]node33.north west)
{
\scriptsize
{
``乔布斯 任职 于''
}}
;
\node
[anchor=south] (node34) at ([yshift=1.0em]node24.north)
{
\scriptsize
{
的表示
\ \ \ \ \ \ \ \
}}
;
\node
[anchor=south west] (node34new) at ([yshift=-0.3em]node34.north west)
{
\scriptsize
{
``乔布斯 任职 于 苹果''
}}
;
\draw
[->,thick] ([yshift=0.1em]node21.north)--([yshift=-0.1em]node31.south);
\draw
[->,thick] ([yshift=0.1em]node22.north)--([yshift=-0.1em]node32.south);
\draw
[->,thick] ([yshift=0.1em]node23.north)--([yshift=-0.1em]node33.south);
\draw
[->,thick] ([yshift=0.1em]node24.north)--([yshift=-0.1em]node34.south);
\draw
[->,thick] ([xshift=-1em]node21.west)--([xshift=-0.1em]node21.west);
\draw
[->,thick] ([xshift=0.1em]node21.east)--([xshift=-0.1em]node22.west);
\draw
[->,thick] ([xshift=0.1em]node22.east)--([xshift=-0.1em]node23.west);
\draw
[->,thick] ([xshift=0.1em]node23.east)--([xshift=-0.1em]node24.west);
\draw
[->,thick] ([xshift=0.1em]node24.east)--([xshift=1em]node24.east);
\draw
[->,thick] ([yshift=0.1em]node11.north)--([yshift=-0.1em]node21.south);
\draw
[->,thick] ([yshift=0.1em]node12.north)--([yshift=-0.1em]node22.south);
\draw
[->,thick] ([yshift=0.1em]node13.north)--([yshift=-0.1em]node23.south);
\draw
[->,thick] ([yshift=0.1em]node14.north)--([yshift=-0.1em]node24.south);
\draw
[->,thick] ([xshift=-1em]node11.west)--([xshift=-0.1em]node11.west);
\draw
[->,thick] ([xshift=0.1em]node11.east)--([xshift=-0.1em]node12.west);
\draw
[->,thick] ([xshift=0.1em]node12.east)--([xshift=-0.1em]node13.west);
\draw
[->,thick] ([xshift=0.1em]node13.east)--([xshift=-0.1em]node14.west);
\draw
[->,thick] ([xshift=0.1em]node14.east)--([xshift=1em]node14.east);
\visible
<2->
{
\node
[anchor=south] (toplabel1) at ([yshift=2em,xshift=-2em]node32new.north)
{
\footnotesize
{
``苹果''的表示:
}}
;
\node
[anchor=west,fill=blue!20!white,minimum width=3em] (toplabel2) at (toplabel1.east)
{
\footnotesize
{
上下文
}}
;
}
\visible
<3->
{
\node
[anchor=west,fill=red!20!white,minimum width=3em] (toplabel3) at (toplabel2.east)
{
\footnotesize
{
词
}}
;
}
\begin{pgfonlayer}
{
background
}
\visible
<3->
{
\node
[rectangle,inner sep=2pt,draw,thick,dashed,red] [fit = (e4)] (r2)
{}
;
\draw
[->,thick,red] (r2.west) .. controls +(west:0.8) and +(south:2) .. ([xshift=1.3em]toplabel3.south);
}
\visible
<2->
{
\node
[rectangle,inner sep=2pt,draw,thick,dashed,ublue,fill=white] [fit = (node33) (node33new)] (r1)
{}
;
\draw
[->,thick,ublue] ([xshift=-2em]r1.north) .. controls +(north:0.7) and +(south:0.7) .. ([xshift=-0.5em]toplabel2.south);
}
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
...
...
Section05-Neural-Networks-and-Language-Modeling/section05.tex
查看文件 @
7f78e16e
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论