forked from mepeichun/SubtitleTranslate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.en.srt
422 lines (332 loc) · 6.46 KB
/
sample.en.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
1
00:00:00,000 --> 00:00:02,430
Coding has been
the bread and butter for
2
00:00:02,430 --> 00:00:04,290
developers since
the dawn of computing.
3
00:00:04,290 --> 00:00:07,170
We're used to creating
applications by breaking down
4
00:00:07,170 --> 00:00:09,330
requirements into
composable problems
5
00:00:09,330 --> 00:00:11,145
that can then be coded against.
6
00:00:11,145 --> 00:00:13,350
So for example, if
we have to write
7
00:00:13,350 --> 00:00:15,990
an application that figures
out a stock analytic,
8
00:00:15,990 --> 00:00:18,480
maybe the price
divided by the ratio,
9
00:00:18,480 --> 00:00:20,400
we can usually write code to get
10
00:00:20,400 --> 00:00:22,380
the values from a data source,
11
00:00:22,380 --> 00:00:25,050
do the calculation and
then return the result.
12
00:00:25,050 --> 00:00:27,180
Or if we're writing a game
13
00:00:27,180 --> 00:00:29,010
we can usually figure
out the rules.
14
00:00:29,010 --> 00:00:30,690
For example, if the ball hits
15
00:00:30,690 --> 00:00:32,160
the brick then the brick should
16
00:00:32,160 --> 00:00:34,230
vanish and the ball
should rebound.
17
00:00:34,230 --> 00:00:36,180
But if the ball falls
off the bottom of
18
00:00:36,180 --> 00:00:38,610
the screen then maybe
the player loses their life.
19
00:00:38,610 --> 00:00:41,355
We can represent that
with this diagram.
20
00:00:41,355 --> 00:00:44,225
Rules and data go in
answers come out.
21
00:00:44,225 --> 00:00:45,620
Rules are expressed in
22
00:00:45,620 --> 00:00:48,320
a programming language
and data can come from
23
00:00:48,320 --> 00:00:50,090
a variety of sources from
24
00:00:50,090 --> 00:00:53,125
local variables all the
way up to databases.
25
00:00:53,125 --> 00:00:56,930
Machine learning
rearranges this diagram
26
00:00:56,930 --> 00:00:58,475
where we put answers in data
27
00:00:58,475 --> 00:01:00,605
in and then we get rules out.
28
00:01:00,605 --> 00:01:02,945
So instead of us as
developers figuring
29
00:01:02,945 --> 00:01:05,510
out the rules when should
the brick be removed,
30
00:01:05,510 --> 00:01:07,205
when should
the player's life end,
31
00:01:07,205 --> 00:01:10,310
or what's the desired analytic
for any other concept,
32
00:01:10,310 --> 00:01:12,170
what we will do is we
can get a bunch of
33
00:01:12,170 --> 00:01:13,850
examples for what we want to
34
00:01:13,850 --> 00:01:17,560
see and then have the computer
figure out the rules.
35
00:01:17,560 --> 00:01:20,360
Now, this is particularly
valuable for problems that
36
00:01:20,360 --> 00:01:23,435
you can't solve by figuring
the rules out for yourself.
37
00:01:23,435 --> 00:01:26,765
So consider this example,
activity recognition.
38
00:01:26,765 --> 00:01:29,870
If I'm building a device that
detects if somebody is say
39
00:01:29,870 --> 00:01:32,975
walking and I have data
about their speed,
40
00:01:32,975 --> 00:01:34,970
I might write code like this
41
00:01:34,970 --> 00:01:36,830
and if they're
running well that's
42
00:01:36,830 --> 00:01:39,170
a faster speed so I
could adapt my code
43
00:01:39,170 --> 00:01:41,580
to this and if they're biking,
44
00:01:41,580 --> 00:01:43,025
well that's not too bad either.
45
00:01:43,025 --> 00:01:45,260
I can adapt my code like this.
46
00:01:45,260 --> 00:01:47,780
But then I have to do
golf recognition too,
47
00:01:47,780 --> 00:01:49,825
now my concept becomes broken.
48
00:01:49,825 --> 00:01:51,080
But not only that,
49
00:01:51,080 --> 00:01:53,750
doing it by speed alone
of course is quite naive.
50
00:01:53,750 --> 00:01:56,150
We walk and run at
different speeds uphill and
51
00:01:56,150 --> 00:01:57,620
downhill and other people
52
00:01:57,620 --> 00:01:59,390
walk and run at
different speeds to us.
53
00:01:59,390 --> 00:02:01,820
So, let's go back
to this diagram.
54
00:02:01,820 --> 00:02:04,050
Ultimately machine
learning is very
55
00:02:04,050 --> 00:02:06,770
similar but we're just
flipping the axes.
56
00:02:06,770 --> 00:02:09,350
So instead of me trying
to express the problem as
57
00:02:09,350 --> 00:02:12,170
rules when often that
isn't even possible,
58
00:02:12,170 --> 00:02:13,595
I'll have to compromise.
59
00:02:13,595 --> 00:02:15,470
The new paradigm is that I get
60
00:02:15,470 --> 00:02:17,720
lots and lots of
examples and then I have
61
00:02:17,720 --> 00:02:20,150
labels on those
examples and I use
62
00:02:20,150 --> 00:02:23,105
the data to say this is
what walking looks like,
63
00:02:23,105 --> 00:02:24,350
this is what running looks like,
64
00:02:24,350 --> 00:02:26,510
this is what biking
looks like and yes,
65
00:02:26,510 --> 00:02:28,400
even this is what
golfing looks like.
66
00:02:28,400 --> 00:02:30,980
So, then it becomes
answers and data
67
00:02:30,980 --> 00:02:34,535
in with rules being
inferred by the machine.
68
00:02:34,535 --> 00:02:36,710
A machine learning algorithm then
69
00:02:36,710 --> 00:02:38,645
figures out the
specific patterns in
70
00:02:38,645 --> 00:02:40,160
each set of data that
71
00:02:40,160 --> 00:02:42,650
determines the
distinctiveness of each.
72
00:02:42,650 --> 00:02:44,270
That's what's so powerful and
73
00:02:44,270 --> 00:02:46,660
exciting about
this programming paradigm.
74
00:02:46,660 --> 00:02:48,440
It's more than just a new way
75
00:02:48,440 --> 00:02:49,775
of doing the same old thing.
76
00:02:49,775 --> 00:02:51,770
It opens up new possibilities
77
00:02:51,770 --> 00:02:53,905
that were infeasible
to do before.
78
00:02:53,905 --> 00:02:55,270
So in the next few minutes,
79
00:02:55,270 --> 00:02:57,680
I'm going to show you
the basics of creating
80
00:02:57,680 --> 00:02:59,360
a neural network which is
81
00:02:59,360 --> 00:03:02,435
the workhorse of doing this type
of pattern recognition.
82
00:03:02,435 --> 00:03:04,040
A neural network is
83
00:03:04,040 --> 00:03:06,200
just a slightly more
advanced implementation of
84
00:03:06,200 --> 00:03:08,695
machine learning and we
call that deep learning.
85
00:03:08,695 --> 00:03:11,330
But fortunately it's
actually very easy to code.
86
00:03:11,330 --> 00:03:13,430
So, we're just going to jump
straight into deep learning.
87
00:03:13,430 --> 00:03:16,130
We'll start with a simple one
and then we'll move on
88
00:03:16,130 --> 00:03:17,675
to one that does computer vision
89
00:03:17,675 --> 00:03:19,250
in about 10 lines of code.
90
00:03:19,250 --> 00:03:22,085
But let's start with a very
simple "Hello World" example.
91
00:03:22,085 --> 00:03:24,870
So you can see just how
everything hangs together.