Skip to content

Commit

Permalink
added RNNs slides
Browse files Browse the repository at this point in the history
  • Loading branch information
racheltho committed Jun 11, 2019
1 parent 8bc4f04 commit 8927b99
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 72 deletions.
119 changes: 80 additions & 39 deletions 6-rnn-english-numbers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,18 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[PosixPath('/home/racheltho/.fastai/data/human_numbers/valid.txt'),\n",
"[PosixPath('/home/racheltho/.fastai/data/human_numbers/models'),\n",
" PosixPath('/home/racheltho/.fastai/data/human_numbers/valid.txt'),\n",
" PosixPath('/home/racheltho/.fastai/data/human_numbers/train.txt')]"
]
},
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -100,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -116,7 +117,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -125,7 +126,7 @@
"'one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirt'"
]
},
"execution_count": 10,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -136,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -145,7 +146,7 @@
"' nine thousand nine hundred ninety eight, nine thousand nine hundred ninety nine'"
]
},
"execution_count": 11,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -156,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 84,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -169,7 +170,7 @@
},
{
"cell_type": "code",
"execution_count": 85,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -178,7 +179,7 @@
"'xxbos one , two , three , four , five , six , seven , eight , nine , ten , eleve'"
]
},
"execution_count": 85,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -189,7 +190,7 @@
},
{
"cell_type": "code",
"execution_count": 86,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -198,7 +199,7 @@
"13017"
]
},
"execution_count": 86,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -216,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 87,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -225,7 +226,7 @@
"(70, 3)"
]
},
"execution_count": 87,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -245,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 88,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -254,7 +255,7 @@
"2.905580357142857"
]
},
"execution_count": 88,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -272,7 +273,7 @@
},
{
"cell_type": "code",
"execution_count": 89,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -285,7 +286,7 @@
},
{
"cell_type": "code",
"execution_count": 90,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand All @@ -300,7 +301,7 @@
" [20, 10, 26, ..., 20, 11, 20]], device='cuda:0')"
]
},
"execution_count": 90,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -318,7 +319,7 @@
},
{
"cell_type": "code",
"execution_count": 91,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand All @@ -327,7 +328,7 @@
"13440"
]
},
"execution_count": 91,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -338,7 +339,7 @@
},
{
"cell_type": "code",
"execution_count": 92,
"execution_count": 16,
"metadata": {},
"outputs": [
{
Expand All @@ -347,7 +348,7 @@
"(torch.Size([64, 70]), torch.Size([64, 70]))"
]
},
"execution_count": 92,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -358,7 +359,7 @@
},
{
"cell_type": "code",
"execution_count": 93,
"execution_count": 17,
"metadata": {},
"outputs": [
{
Expand All @@ -367,7 +368,7 @@
"(torch.Size([64, 70]), torch.Size([64, 70]))"
]
},
"execution_count": 93,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -378,7 +379,7 @@
},
{
"cell_type": "code",
"execution_count": 94,
"execution_count": 18,
"metadata": {},
"outputs": [
{
Expand All @@ -387,7 +388,7 @@
"(torch.Size([64, 70]), torch.Size([64, 70]))"
]
},
"execution_count": 94,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -398,7 +399,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -407,7 +408,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 20,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -454,7 +455,7 @@
" 'nineteen']"
]
},
"execution_count": 51,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -465,7 +466,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 21,
"metadata": {},
"outputs": [
{
Expand All @@ -477,7 +478,7 @@
" 9, 20, 10, 20, 11, 20, 11, 20, 20, 20], device='cuda:0')"
]
},
"execution_count": 47,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -488,7 +489,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand All @@ -500,7 +501,7 @@
" 20, 11, 24, 11, 19, 9, 19, 11, 11, 10], device='cuda:0')"
]
},
"execution_count": 48,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -511,7 +512,7 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": 23,
"metadata": {},
"outputs": [
{
Expand All @@ -520,7 +521,7 @@
"(',', 'thousand', 'one', 'two', 'hundred')"
]
},
"execution_count": 52,
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -531,7 +532,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 24,
"metadata": {},
"outputs": [
{
Expand All @@ -540,7 +541,7 @@
"'xxbos eight thousand one , eight thousand two , eight thousand three , eight thousand four , eight thousand five , eight thousand six , eight thousand seven , eight thousand eight , eight thousand nine , eight thousand ten , eight thousand eleven , eight thousand twelve , eight thousand thirteen , eight thousand fourteen , eight thousand fifteen , eight thousand sixteen , eight thousand seventeen , eight'"
]
},
"execution_count": 53,
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -549,6 +550,46 @@
"v.textify(x1[0])"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"', eight thousand forty six , eight thousand forty seven , eight thousand forty eight , eight thousand forty nine , eight thousand fifty , eight thousand fifty one , eight thousand fifty two , eight thousand fifty three , eight thousand fifty four , eight thousand fifty five , eight thousand fifty six , eight thousand fifty seven , eight thousand fifty eight , eight thousand fifty nine ,'"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"v.textify(x1[1])"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'eight thousand sixty , eight thousand sixty one , eight thousand sixty two , eight thousand sixty three , eight thousand sixty four , eight thousand sixty five , eight thousand sixty six , eight thousand sixty seven , eight thousand sixty eight , eight thousand sixty nine , eight thousand seventy , eight thousand seventy one , eight thousand seventy two , eight thousand seventy three , eight thousand'"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"v.textify(x2[1])"
]
},
{
"cell_type": "code",
"execution_count": 21,
Expand Down
Binary file added RNNs.pptx
Binary file not shown.
Loading

0 comments on commit 8927b99

Please sign in to comment.