1
00:00:00,390 --> 00:00:02,010
Welcome back everyone.

2
00:00:02,010 --> 00:00:08,760
I am so excited for this next section and of course we're starting off with our six step machine learning

3
00:00:08,880 --> 00:00:10,550
modeling workflow.

4
00:00:10,570 --> 00:00:16,590
We're going to Problem Definition Data Evaluation features modeling and experiments.

5
00:00:16,620 --> 00:00:21,090
Again we're trying to just make this almost second nature with whatever machine learning modeling tasks

6
00:00:21,090 --> 00:00:21,690
we come across.

7
00:00:21,690 --> 00:00:27,680
If we've got some data these are some steps that we can take to figure out insights from that data.

8
00:00:27,720 --> 00:00:32,300
Now let's have a look at what tools we can use and what's important is that in this section we're going

9
00:00:32,300 --> 00:00:39,270
to have a look at tensor flow And now you might be wondering OK I see part torch here I see socket line

10
00:00:39,300 --> 00:00:41,330
I see we've already had a look at socket line.

11
00:00:41,340 --> 00:00:43,300
But what is tensor flow.

12
00:00:43,590 --> 00:00:46,520
Well that's what we're going to be diving into in this entire section.

13
00:00:46,530 --> 00:00:50,640
And we're kind of going to be teaching this one a little bit differently to how we've looked at the

14
00:00:50,640 --> 00:00:53,700
panda's map properly no hindsight and Loan Section.

15
00:00:53,700 --> 00:00:59,240
Now the reason being is because the book on tensor flow in the book on deep learning and no networks

16
00:00:59,250 --> 00:01:04,890
are what we're going to cover in this section is not as established yet as what socket learn is the

17
00:01:04,890 --> 00:01:11,220
socket loan's been around for over 10 years whereas tensor flow the version we're about to use only

18
00:01:11,220 --> 00:01:12,450
came out a couple of months ago.

19
00:01:12,450 --> 00:01:18,630
So if you're watching this in 2020 or later on really the version of tensor flow tends to flow 2.0.

20
00:01:18,630 --> 00:01:23,120
It might be a higher version by now only came out at the end of 2019.

21
00:01:23,160 --> 00:01:26,580
So what we're doing in this section is we're using cutting edge stuff.

22
00:01:27,180 --> 00:01:32,830
And what's even more exciting is that we've got a new contender to our workspace environment.

23
00:01:32,830 --> 00:01:34,580
That's Google collab.

24
00:01:34,590 --> 00:01:38,550
Now the reason being is because we're gonna need access to a GP you will have a look at that in a second

25
00:01:38,580 --> 00:01:43,110
but this is our workspace that we're gonna be using for this section.

26
00:01:43,110 --> 00:01:47,430
Now if you're not familiar with Google Ecolab that's okay we're gonna go through it it's very similar

27
00:01:47,430 --> 00:01:49,070
to a Jupiter notebook.

28
00:01:49,180 --> 00:01:52,540
Now you might be thinking what is tensor flow.

29
00:01:52,540 --> 00:01:54,150
And that's a great question.

30
00:01:54,180 --> 00:01:58,850
Well that's a flow is a deep learning or numerical computing library.

31
00:01:58,860 --> 00:02:01,320
That's probably a better term for it.

32
00:02:01,470 --> 00:02:07,080
Now it was first conceived by Google and they used it within their own like it was in an internal software

33
00:02:07,080 --> 00:02:10,410
library for all of their deep learning and machine learning needs.

34
00:02:10,530 --> 00:02:15,720
And it's actually now open source so anyone can contribute to test flow.

35
00:02:15,720 --> 00:02:18,270
The most recent update this hits a flow 2.0.

36
00:02:18,270 --> 00:02:21,630
It is packed full of updates of the community.

37
00:02:21,690 --> 00:02:27,680
The people like yourself and me who use tensor flow have asked for like Hey this didn't really work.

38
00:02:27,690 --> 00:02:29,160
Can we make it a bit better.

39
00:02:29,190 --> 00:02:33,420
So older versions had the flow you don't have to worry about what we're covering is the latest stuff

40
00:02:33,420 --> 00:02:34,080
here.

41
00:02:34,200 --> 00:02:41,310
There's a flow is used to build deep learning and no network models to gain insights out of unstructured

42
00:02:41,310 --> 00:02:42,330
data.

43
00:02:42,360 --> 00:02:47,550
Now in the previous projects we've dealt with data that's available in a data frame so something that

44
00:02:47,550 --> 00:02:54,030
looks like an Excel spreadsheet it has rows and columns but deep learning is more suited to unstructured

45
00:02:54,030 --> 00:03:01,680
data such as photos or audio waves or natural language text unstructured data that doesn't really have

46
00:03:01,680 --> 00:03:08,250
any specific structure and now tensor flow allows us to build a deep learning model kind of like a no

47
00:03:08,250 --> 00:03:09,270
network.

48
00:03:09,270 --> 00:03:15,510
Well exactly like a known network to gain insights out of this unstructured data and it also allows

49
00:03:15,510 --> 00:03:22,680
us to check and evaluate how our neural network which is another form of machine learning model is doing.

50
00:03:22,680 --> 00:03:28,010
Is it getting things right or is it getting things wrong now.

51
00:03:28,130 --> 00:03:29,500
Why tensor flow.

52
00:03:29,510 --> 00:03:35,000
Well the most important thing is that we can write fast deep learning code in Python.

53
00:03:35,000 --> 00:03:40,450
Now what I mean by fast is that it's code able to run on a GP you know if you're not sure the GPO is

54
00:03:40,460 --> 00:03:47,030
don't worry we'll check that in a second and tensor flows able to access many pre-built deep learning

55
00:03:47,030 --> 00:03:48,340
models.

56
00:03:48,380 --> 00:03:49,510
Now this is important.

57
00:03:49,820 --> 00:03:53,450
So like socket learn has a bunch of machine learning models built into it.

58
00:03:53,450 --> 00:04:00,860
We've already seen site get learn tensor flow also has the ability to access pre-built deep learning

59
00:04:00,860 --> 00:04:01,430
models.

60
00:04:01,460 --> 00:04:04,160
So we'll see how to do that in the upcoming project.

61
00:04:04,190 --> 00:04:07,770
It also enables you to do the whole stack.

62
00:04:07,850 --> 00:04:11,550
What I mean by that you can pre process your data using tensor flow.

63
00:04:11,660 --> 00:04:17,510
You can model it using tensor flow and you can also deploy a model that you build using tensor flow

64
00:04:18,200 --> 00:04:19,950
and we just spoke about this one.

65
00:04:20,060 --> 00:04:23,420
It was originally designed and used in-house by Google.

66
00:04:23,480 --> 00:04:29,300
Now it's open source so people like you and me we have access to exactly the same software that Google

67
00:04:29,300 --> 00:04:36,260
use in-house for their deep learning and machine learning workflows and we spoke about a GPO what actually

68
00:04:36,260 --> 00:04:43,850
is a GP the GP use stands for graphical processing unit and the main thing you have to know for now

69
00:04:44,300 --> 00:04:49,380
is that it's a lot faster than a regular CPA you is at doing numerical computing.

70
00:04:49,460 --> 00:04:55,580
So if you remember if machine learning is finding patterns in data a.k.a. turning data or information

71
00:04:55,580 --> 00:05:02,840
into numbers finding patterns in those numbers a GP you is what's going to help us to increase the speed

72
00:05:02,840 --> 00:05:05,710
of finding those patterns in those numbers.

73
00:05:05,720 --> 00:05:06,590
That's all we need to know.

74
00:05:08,160 --> 00:05:11,640
Now if you remember way back in that machine learning what one section.

75
00:05:11,640 --> 00:05:13,700
So this is why I throwback here.

76
00:05:13,980 --> 00:05:16,000
We looked at this slide choosing a model.

77
00:05:16,700 --> 00:05:21,660
So we've got structured data here you might choose a model and you might use one of these libraries

78
00:05:21,690 --> 00:05:26,890
unstructured data like cash boost extra boost or random forest we saw that an escalation.

79
00:05:27,000 --> 00:05:32,190
Now we're going to start working with problem 2 unstructured data through our photos or audio files

80
00:05:32,190 --> 00:05:36,010
here and we've got model 2 which is well like a neural network.

81
00:05:36,030 --> 00:05:42,270
This is kind of what you'll see if you google up neural network and now these type of models deep learning

82
00:05:42,270 --> 00:05:47,390
and transfer learning work much better on unstructured data like we've just talked about.

83
00:05:47,580 --> 00:05:52,680
And so tensor flow is what we can use to build deep learning models and tend to flow.

84
00:05:52,680 --> 00:06:00,150
Hub is where we'll be going to use transfer learning a.k.a. taking what one model knows and using it

85
00:06:00,270 --> 00:06:07,000
in another model and you might be asking what is deep learning and what are neural networks.

86
00:06:07,000 --> 00:06:12,370
Well I want you to think of it like this deep learning is just another form of machine learning and

87
00:06:12,370 --> 00:06:14,480
neural network something like this.

88
00:06:14,560 --> 00:06:20,170
These are the type of machine learning algorithm that are usually referred to when we talk about deep

89
00:06:20,170 --> 00:06:21,370
learning.

90
00:06:21,370 --> 00:06:26,590
And so if we have this image of a dog and we're trying to identify that's my dog Seven How beautiful

91
00:06:26,590 --> 00:06:27,010
is she.

92
00:06:27,010 --> 00:06:28,280
And that's Bella in the background.

93
00:06:28,330 --> 00:06:35,040
But let's say we're trying to identify the breed of seven a no network might look at this image converted

94
00:06:35,050 --> 00:06:43,610
into numbers and then go make this little model here is going to remember what a leg looks like and

95
00:06:43,610 --> 00:06:47,450
then this one here is gonna remember what eyes look like and then these ones.

96
00:06:47,450 --> 00:06:48,950
Who knows what they're going to figure out.

97
00:06:48,950 --> 00:06:53,200
And then eventually we realize that this is an image of a labrador.

98
00:06:53,240 --> 00:06:55,150
If our neural network is learning right.

99
00:06:55,280 --> 00:07:01,010
So this is what I want you to imagine a neural network as is that the same process with all of our other

100
00:07:01,010 --> 00:07:06,470
machine learning models that we've looked at is you have an input some kind of data and then you have

101
00:07:06,470 --> 00:07:07,880
a machine learning model here.

102
00:07:07,910 --> 00:07:15,330
In our case a neural network and then you have some sort of output now a no no what you may be wondering

103
00:07:15,510 --> 00:07:17,820
what are all these little nodes here.

104
00:07:17,820 --> 00:07:19,350
They're also called nodes.

105
00:07:19,350 --> 00:07:23,180
While these are small models within themselves.

106
00:07:23,310 --> 00:07:28,680
So what's going to happen here is that each of these small models is going to add up and figure out

107
00:07:28,680 --> 00:07:35,430
some kind of pattern in this data and then learn what that pattern relates to a.k.a. the label.

108
00:07:35,430 --> 00:07:42,650
And so where does deep learning come from if it's just if no network is just another type of machine

109
00:07:42,650 --> 00:07:44,410
learning model.

110
00:07:44,530 --> 00:07:51,630
Well this is where the deep part comes from when building a neural network you might use multiple layers.

111
00:07:51,630 --> 00:07:57,890
I see here we've got our original one but then you might add more neural networks on top of your original

112
00:07:57,890 --> 00:07:58,580
neural network.

113
00:07:58,670 --> 00:08:03,920
And what this might do what this and I say might because again it's a lot of trial and error in this

114
00:08:03,920 --> 00:08:09,050
sort of model finding that's why I said in the beginning the book on deep learning is yet to be fully

115
00:08:09,050 --> 00:08:14,580
completed yet because we're still working out the best way to lay out these neural networks.

116
00:08:14,660 --> 00:08:19,230
And so I've got here a few more boxes than what we had in the previous slide.

117
00:08:19,230 --> 00:08:26,540
And what this means is that as you add more layers here these other nodes these smaller models in the

118
00:08:26,540 --> 00:08:33,830
node network are going to start to be able to detect more and more features and thus hopefully getting

119
00:08:33,830 --> 00:08:39,850
better at identifying the information in our unstructured data.

120
00:08:39,880 --> 00:08:43,180
Now what kind of deep learning problems are there.

121
00:08:43,180 --> 00:08:47,950
Well we've spoken about classification we've also seen that in a heart disease project but you might

122
00:08:47,950 --> 00:08:53,440
want to classify what kind of dog breeds are in an image or whether an email is spam or not.

123
00:08:53,440 --> 00:08:56,410
In this case this email is definitely not spam.

124
00:08:56,560 --> 00:09:02,610
Otherwise there's a sequence to sequence problem also known as sector say and now this is a kind of

125
00:09:02,610 --> 00:09:05,990
problem that happens with Siri or Google home or something like that.

126
00:09:06,060 --> 00:09:11,370
It also happens with Google Translate so it takes an audio wave and it's going to translate that into

127
00:09:11,370 --> 00:09:13,240
some sort of text or command.

128
00:09:13,530 --> 00:09:19,170
And then finally there's object detection which is similar to image classification but now you're trying

129
00:09:19,170 --> 00:09:23,540
to find out where a specific object is inside an image.

130
00:09:23,550 --> 00:09:26,960
So this is a kind of deep learning problem that a self-driving car.

131
00:09:26,970 --> 00:09:32,880
I have to come into or will come into if they're using cameras right it's trying to identify what objects

132
00:09:32,880 --> 00:09:36,310
are in an image of a test the self-driving car has eight cameras.

133
00:09:36,570 --> 00:09:39,880
It's always trying to pick up what objects are in its way.

134
00:09:40,020 --> 00:09:45,330
And I mean there's many more deep learning problems out there but this is three of the main ones that

135
00:09:45,330 --> 00:09:50,190
you're going to come across in your day to day life okay.

136
00:09:50,200 --> 00:09:52,370
And we mentioned transfer learning before.

137
00:09:52,370 --> 00:09:55,950
So what is transfer learning and why should we use it.

138
00:09:55,970 --> 00:10:01,460
Well the main premise of transfer learning is taking what you know in one domain and applying it to

139
00:10:01,460 --> 00:10:01,970
another.

140
00:10:02,840 --> 00:10:07,880
So if you're training a machine learning model to pick up different dog breeds and images and you're

141
00:10:07,880 --> 00:10:12,950
trying to train a machine learning model from scratch that can be both expensive and time consuming.

142
00:10:13,160 --> 00:10:19,040
But if you've already got a machine learning model which has learned to identify other objects and images

143
00:10:19,580 --> 00:10:23,440
the beautiful thing is you can use transfer learning.

144
00:10:23,450 --> 00:10:28,880
So taking what that machine learning model or neural network taking those patterns that it's learned

145
00:10:29,270 --> 00:10:34,970
in another set of images and then apply those patterns to your own problem.

146
00:10:34,970 --> 00:10:39,050
So this leads us to question why not take advantage of what's already out there.

147
00:10:39,050 --> 00:10:42,380
Why not take advantage of what another model already knows.

148
00:10:42,380 --> 00:10:48,630
That's what we'll be looking at doing in this project and more specifically what are we going to cover.

149
00:10:48,630 --> 00:10:56,090
Well if you remember our socket line workflow our tensor flow workflow is very similar.

150
00:10:56,120 --> 00:10:57,460
We've got to get data ready.

151
00:10:57,470 --> 00:11:01,030
But this time it's unstructured data rather than structured data.

152
00:11:01,100 --> 00:11:03,190
And this is the main premise here.

153
00:11:03,230 --> 00:11:09,290
And I would stress this until I go horse is getting the data ready is essentially just turning our data

154
00:11:09,350 --> 00:11:10,370
into tenses.

155
00:11:10,370 --> 00:11:17,070
Hence tensor flow and then once our data is in tenses we pick a model to suit our problem we're going

156
00:11:17,070 --> 00:11:21,150
to use tensor flow hub for this and then we'll fit the model to the data.

157
00:11:21,180 --> 00:11:26,390
So okay I get the model to find patterns in the data for us and we'll learn how to make a prediction.

158
00:11:26,430 --> 00:11:32,230
Once our model has learned some patterns in our data then we'll evaluate our model to see if hey are

159
00:11:32,340 --> 00:11:33,150
these predictions.

160
00:11:33,150 --> 00:11:34,270
Are they any good or not.

161
00:11:35,010 --> 00:11:40,440
We'll see how to improve through experimentation and then we'll save and reload our trained model

162
00:11:43,750 --> 00:11:45,780
now in a dot point form.

163
00:11:45,850 --> 00:11:50,470
We're going to go through an end to end multi class classification workflow intensive low.

164
00:11:50,470 --> 00:11:52,510
We'll see what that is in a second.

165
00:11:52,600 --> 00:11:57,970
We'll learn how to pre process image data so getting it into tenses we'll learn how to choose a deep

166
00:11:57,970 --> 00:11:59,140
learning model.

167
00:11:59,410 --> 00:12:02,710
We'll learn how to fit it to the data so learning the patterns.

168
00:12:02,710 --> 00:12:06,700
Then we'll learn how to make predictions without deep learning models so using the patterns that it's

169
00:12:06,700 --> 00:12:13,430
learned then will evaluate our models predictions we'll save and load our deep learning model and then

170
00:12:13,430 --> 00:12:17,240
we'll use a trained model to make predictions on our own custom data.

171
00:12:18,270 --> 00:12:20,680
How far out is a big section.

172
00:12:20,700 --> 00:12:23,360
But I'm excited now.

173
00:12:23,370 --> 00:12:24,650
What is the problem.

174
00:12:24,810 --> 00:12:31,450
We're going to work on as a classification problem and it's the Kaggle dog breed identification problem.

175
00:12:31,620 --> 00:12:34,640
So determine the breed of a dog in an image.

176
00:12:34,770 --> 00:12:40,260
And now this kind of problem is multi class classification so that means there is more than two options

177
00:12:40,290 --> 00:12:41,710
but we'll have a look at this shortly.

178
00:12:43,110 --> 00:12:45,380
Now where can you get help with all of this.

179
00:12:45,390 --> 00:12:51,240
Because we're learning concepts and code at the same time all within a project.

180
00:12:51,240 --> 00:12:53,820
Do your best to follow along with your code.

181
00:12:53,820 --> 00:12:59,090
If in doubt run the code remember try it for yourself because we're using Google collab.

182
00:12:59,100 --> 00:13:04,050
We'll see this in a second reading a doctoring is a little bit different to our Juba notebook.

183
00:13:04,050 --> 00:13:06,860
You have to press shift command and space to read it.

184
00:13:07,140 --> 00:13:09,960
If you're still stuck Don't be afraid to search for it.

185
00:13:10,560 --> 00:13:16,660
You'll come across stack overflow or the Texans of faux documentation and then try again using what

186
00:13:16,660 --> 00:13:22,720
you found on stack overflow or tensor flows documentation and then finally if you're still stuck.

187
00:13:22,720 --> 00:13:28,610
Never be afraid to ask and of course don't forget discord chat which hopefully you're signed up to.

188
00:13:28,690 --> 00:13:34,570
Hopefully you're in there interacting with the other students and now without any further ado let's

189
00:13:34,570 --> 00:13:35,910
go find those dog eyes.
