You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rnn.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ permalink: /rnn/
6
6
7
7
Table of Contents:
8
8
9
-
-[Intro to RNN](#intro)
9
+
-[Introduction to RNN](#intro)
10
10
-[RNN example as Character-level language model](#char)
11
11
-[Multilayer RNNs](#multi)
12
12
-[Long-Short Term Memory (LSTM)](#lstm)
@@ -16,7 +16,7 @@ Table of Contents:
16
16
17
17
<aname='intro'></a>
18
18
19
-
## Intro to RNN
19
+
## Introduction to RNN
20
20
21
21
In this lecture note, we're going to be talking about the Recurrent Neural Networks (RNNs). One
22
22
great thing about the RNNs is that they offer a lot of flexibility on how we wire up the neural
@@ -25,25 +25,26 @@ input vector (red), then we process it with some hidden layers (green), and we
25
25
fixed sized output vector (blue) as depicted in the leftmost model ("Vanilla" Neural Networks) in Figure 1.
26
26
While **"Vanilla" Neural Networks** receive a single input and produce one label for that image, there are tasks where
27
27
the model produce a sequence of outputs as shown in the one-to-many model in Figure 1. **Recurrent Neural Networks** allow
28
-
us to operate over sequences of input, output, or both at the same time. An example of **one-to-many** model is image
29
-
captioning where we are given a fixed sized image and produce a sequence of words that describe the content of that image through RNN (second model in Figure 1).
30
-
An example of **many-to-one** task is action prediction where we look at a sequence of video frames instead of a single image and produce
28
+
us to operate over sequences of input, output, or both at the same time.
29
+
* An example of **one-to-many** model is image captioning where we are given a fixed sized image and produce a sequence of words that describe the content of that image through RNN (second model in Figure 1).
30
+
*An example of **many-to-one** task is action prediction where we look at a sequence of video frames instead of a single image and produce
31
31
a label of what action was happening in the video as shown in the third model in Figure 1. Another example of many-to-one task is
32
-
sentiment classification in NLP where we are given a sequence of words
33
-
of a sentence and then classify what sentiment (e.g. positive or negative) that sentence is.
34
-
An example of **many-to-many** task is video-captioning where the input is a sequence of video frames and the output is caption that describes
32
+
sentiment classification in NLP where we are given a sequence of words of a sentence and then classify what sentiment (e.g. positive or negative) that sentence is.
33
+
* An example of **many-to-many** task is video-captioning where the input is a sequence of video frames and the output is caption that describes
35
34
what was in the video as shown in the fourth model in Figure 1. Another example of many-to-many task is machine translation in NLP, where we can have an
36
-
RNN that takes a sequence of words of a sentence in English, and then this RNN is asked to produce
37
-
a sequence of words of a sentence in French. There is a also a variation of many-to-many task as shown in the last model in Figure 1,
35
+
RNN that takes a sequence of words of a sentence in English, and then this RNN is asked to produce a sequence of words of a sentence in French.
36
+
* There is a also a variation of many-to-many task as shown in the last model in Figure 1,
38
37
where the model generates an output at every timestep. An example of this many-to-many task is video classification on a frame level
39
38
where the model classifies every single frame of video with some number of classes. We should note that we don't want
40
39
this prediction to only be a function of the current timestep (current frame of the video), but also all the timesteps (frames)
41
-
that have come before this video. In general, RNNs allow us to wire up an architecture, where the prediction at every single timestep is a
40
+
that have come before this video.
41
+
42
+
In general, RNNs allow us to wire up an architecture, where the prediction at every single timestep is a
42
43
function of all the timesteps that have come before.
43
44
44
45
<divclass="fig figcenter fighighlight">
45
46
<imgsrc="/assets/rnn/types.png"width="100%">
46
-
<divclass="figcaption">Figure 1. Different (non-exhaustive) types of Recurrent Neural Network architectures. Red boxes are input vectors. Green boxes are hidden layers. Blue boxes are output vectors.</div>
47
+
<divclass="figcaption"> <b> Figure 1.</b> Different (non-exhaustive) types of Recurrent Neural Network architectures. Red boxes are input vectors. Green boxes are hidden layers. Blue boxes are output vectors.</div>
47
48
</div>
48
49
49
50
A Recurrent Neural Network is basically a blackbox (Figure 2), where it has a state and it receives through
0 commit comments