‫Welcome back, everyone.
‫I am so excited for this next section.
‫And of course, we're starting off with our six step machine learning modeling workflow.
‫We've got our problem definition data evaluation features, modeling and experiments.
‫Again, we're trying to just make this almost second nature with whatever machine learning, modeling
‫tasks we come across, if we've got some data.
‫These are some steps that we can take to figure out insights from that data.
‫Now let's have a look at what tools we can use.
‫And what's important is that in this section, we're going to have a look at TensorFlow.
‫And now you might be wondering, hmm, okay.
‫I see PyTorch here.
‫I see socket learn.
‫I see we've already had a look at second line, but what is TensorFlow?
‫Well, that's what we're going to be diving into in this entire section and we're kind of going to be
‫teasing this one a little bit differently to how we've looked at the pandas map, plot loop, numpy
‫and socket learn section.
‫Now, the reason being is because the book on TensorFlow and the book on deep learning and neural networks
‫of what we're going to cover in this section is not as established yet as what Psychic Learn is.
‫So Psychic learns being around for over ten years.
‫Whereas TensorFlow, the version we're about to use, only came out a couple of months ago.
‫So if you're watching this in 2020 or later on, really the version of TensorFlow.
‫TensorFlow 2.0, it might be a higher version by now, only came out at the end of 2019.
‫So what we're doing in this section is we're using cutting edge stuff.
‫And what's even more exciting is that we've got a new contender to our workspace environment and that's
‫Google CoLab.
‫Now the reason being is because we're going to need access to a GPU.
‫We'll have a look at that in a second.
‫But this is our workspace that we're going to be using for this section.
‫Now, if you're not familiar with Google CoLab, that's okay.
‫We're going to go through it.
‫It's very similar to a Jupyter Notebook.
‫Now you might be thinking, what is TensorFlow?
‫And that's a great question.
‫Well, TensorFlow is a deep learning or numerical computing library.
‫That's probably a better term for it.
‫Now, it was first conceived by Google, and they used it within their own like it was an internal software
‫library for all of their deep learning and machine learning needs.
‫And it's actually now open source so anyone can contribute to TensorFlow.
‫The most recent update, the TensorFlow 2.0.
‫It is packed full of updates that the community, the people like yourself and me who use TensorFlow
‫have asked for like, hey, this didn't really work.
‫Can we make it a bit better?
‫So older versions of TensorFlow you don't have to worry about.
‫What we're covering is the latest stuff here.
‫TensorFlow is used to build deep learning and neural network models to gain insights out of unstructured
‫data.
‫Now, in the previous projects, we've dealt with data that's available in a data frame.
‫So something that looks like an Excel spreadsheet.
‫It has rows and columns, but deep learning is more suited to unstructured data, such as photos or
‫audio waves or natural language text unstructured data that doesn't really have any specific structure.
‫And now TensorFlow allows us to build a deep learning model, kind of like a neural network.
‫Well, exactly like a neural network to gain insights out of this unstructured data.
‫And it also allows us to check and evaluate how our neural network, which is another form of machine
‫learning model, is doing.
‫Is it getting things right or is it getting things wrong?
‫Now.
‫Why TensorFlow?
‫Well, the most important thing is that we can write fast, deep learning code in Python.
‫Now, what I mean by fast is that it's code able to run on a CPU, and if you're not sure what a GPU
‫is, don't worry.
‫We'll check that in a second.
‫And TensorFlow is able to access many prebuilt, deep learning models are.
‫Now, this is important.
‫So like Psychic Learn has a bunch of machine learning models built into it.
‫We've already seen Psychic Learn.
‫TensorFlow also has the ability to access prebuilt, deep learning models, so we'll see how to do that
‫in the upcoming project.
‫It also enables you to do the whole stack.
‫What I mean by that you can pre process your data using TensorFlow, you can model it using TensorFlow,
‫and you can also deploy a model that you build using TensorFlow.
‫And we just spoke about this one.
‫It was originally designed and used in-house by Google.
‫Now it's open source.
‫So people like you and me, we have access to exactly the same software that Google use in-house for
‫their deep learning and machine learning workflows.
‫Well, we spoke about a GPU.
‫What actually is a GPU?
‫Well, the GPU stands for graphical processing unit.
‫And the main thing you have to know for now is that it's a lot faster than a regular CPU is at doing
‫numerical computing.
‫So if you remember, if machine learning is finding patterns in data a.k.a turning data or information
‫into numbers, finding patterns in those numbers, a GPU is what's going to help us to increase the
‫speed of finding those patterns in those numbers.
‫That's all we need to know.
‫Now, if you remember why back in that machine learning one on one session.
‫So this is why I grew up throwback here.
‫We looked at this slide, choosing a model.
‫So we've got structured data here.
‫You might choose a model and you might use one of these libraries on structured data like Cat Boost,
‫Boost or Random Forest.
‫We saw that in Skyline.
‫Now we're going to start working with problem to unstructured data.
‫So we've got photos or audio files here and we've got model two, which is what, like a neural network.
‫This is kind of what you'll see if you Google up neural network.
‫And now these type of models, deep learning and transfer learning.
‫Work much better on unstructured data like we've just talked about.
‫And so TensorFlow is what we can use to build deep learning models.
‫And TensorFlow hub is where we'll be going to use transfer learning, a.k.a. taking what one model knows
‫and using it in another model.
‫Now you might be asking what is deep learning and what are neural networks?
‫Well, I want you to think of it like this.
‫Deep learning is just another form of machine learning and neural networks, something like this.
‫These are the type of machine learning algorithm that are usually referred to when we talk about deep
‫learning.
‫And so if we have this image of a dog and we're trying to identify that's my dog.
‫Seven.
‫How beautiful is she?
‫And that's Bella in the background.
‫But let's say we're trying to identify the breed of seven.
‫A neural network might look at this image, convert it into numbers, and then go, Hmm, okay.
‫This little model here.
‫Is going to remember what a leg looks like.
‫And then this one here is going to remember what eyes look like.
‫And then these ones, who knows what they're going to figure out.
‫And then eventually we realize that this is an image of a Labrador.
‫If our neural network is learning, right.
‫So this is what I want you to imagine a neural network as is that the same process with all of our other
‫machine learning models that we've looked at is you have an input, some kind of data, and then you
‫have a machine learning model here, in our case, a neural network.
‫And then you have some sort of output.
‫Now a neural network, you might be wondering what are all these little nodes here?
‫They're also called nodes.
‫Well, these are small models within themselves.
‫So what's going to happen here is that each of these small models is going to add up and figure out
‫some kind of pattern in this data and then learn what that pattern relates to a.k.a the label.
‫And so.
‫Where does deep learning come from if it's just if a neural network is just another type of machine
‫learning model?
‫Well, this is where the deep part comes from.
‫When building a neural network, you might use multiple layers.
‫So see here we've got our original one, but then you might add more neural networks on top of your
‫original neural network.
‫And what this might do, what this and I say might, because again, it's a lot of trial and error in
‫this sort of model finding.
‫That's why I said in the beginning the book on deep learning is yet to be fully completed yet because
‫we're still working out the best way to lay out these neural networks.
‫And so I've got here a few more boxes than what we had in the previous slide.
‫And what this means is that as you add more layers here, these other nodes, these smaller models in
‫the neural network are going to start to be able to detect more and more features and thus hopefully
‫getting better at identifying the information in our unstructured data.
‫Now, what kind of deep learning problems are there?
‫Well, we've spoken about classification.
‫We've also seen that in a heart disease project.
‫But you might want to classify what kind of dog breeds are in an image or whether an email is spam or
‫not.
‫In this case, this email is definitely not spam.
‫Otherwise, there's a sequence to sequence problem also known as Sector SEQ.
‫And now this is the kind of problem that happens with Siri or Google Home or something like that.
‫It also happens with Google Translate.
‫So it takes an audio wave and it's going to translate that into some sort of text or command.
‫And then finally, there's object detection, which is similar to image classification, but now you're
‫trying to find out where a specific object is inside an image.
‫So this is a kind of deep learning problem that a self-driving car might have to come into or will come
‫into if they're using cameras.
‫Right.
‫It's trying to identify what objects are in an image.
‫If a Tesla self-driving car has eight cameras, it's always trying to pick up what objects are in its
‫way.
‫And I mean, there's many more deep learning problems out there.
‫But this is three of the main ones that you're going to come across in your day to day life.
‫Okay.
‫And we mentioned transfer learning before.
‫So what is transfer learning and why should we use it?
‫Well, the main premise of transfer learning is taking what, you know, in one domain and applying
‫it to another.
‫So if you're training a machine learning model to pick up different dog breeds and images and you're
‫trying to train a machine learning model from scratch, that can be both expensive and time consuming.
‫But if you've already got a machine learning model which is learned to identify other objects in images,
‫the beautiful thing is you can use transfer learning.
‫So taking what that machine learning model or neural network taking those patterns at, it's learned
‫in another set of images and then apply those patterns to your own problem.
‫So this leads us to question why not take advantage of what's already out there?
‫Why not take advantage of what another model already knows?
‫That's what we'll be looking at doing in this project.
‫And more specifically, what are we going to cover?
‫Well, if you remember our psychic loan workflow.
‫Our TensorFlow workflow is very similar.
‫We've got to get data ready, but this time it's unstructured data rather than structured data.
‫And this is the main premise here, and I will stress this until I go horse is getting the data ready
‫is essentially just turning our data into tenses, hence TensorFlow.
‫And then once our data is in tenses, we pick a model to suit our problem.
‫We're going to use TensorFlow hub for this and then we'll fit the model to the data.
‫So a.k.a, get the model to find patterns in the data for us and we'll learn how to make a prediction.
‫Once our model has learned some patterns in our data, then we'll evaluate our model to see if, hey,
‫are these predictions?
‫Are they any good or not?
‫We'll see how to improve through experimentation, and then we'll save and reload our trained model.
‫Now in adult point form, we're going to go through an end to end multiclass classification workflow
‫at TensorFlow.
‫We'll see what that is in a second.
‫We'll learn how to pre process image data.
‫So getting it into tenses, we'll learn how to choose a deep learning model.
‫We'll learn how to fit it to the data.
‫So learning the patterns, then we'll learn how to make predictions with our deep learning models.
‫So using the patterns that it's learned, then we'll evaluate our model's predictions.
‫We'll save and load our deep learning model.
‫And then we'll use a trained model to make predictions on our own custom data.
‫How far out?
‫This is a big section, but I'm excited.
‫Now what is the problem?
‫We're going to work on it's a classification problem and it's the cargo dog breed identification problem.
‫So determine the breed of a dog in an image.
‫And now this kind of problem is multiclass classification.
‫So that means there is more than two options.
‫But we'll have a look at this shortly.
‫Now, where can you get help with all of this?
‫Because we're learning concepts and code at the same time, all within a project.
‫Do your best to follow along with your code.
‫If in doubt, run the code.
‫Remember, try it for yourself because we're using Google CoLab.
‫We'll see this in a second.
‫Reading a docstring is a little bit different to Jupyter Notebook.
‫You have to press shift command in space to read it if you're still stuck.
‫Don't be afraid to search for it.
‫You'll come across StackOverflow or the text to follow documentation.
‫And then try again using what you found on StackOverflow or TensorFlow as documentation.
‫And then finally, if you're still stuck, never be afraid to ask.
‫And of course, don't forget Discord Chat, which hopefully you'll signed up to.
‫Hopefully you're in there interacting with the other students.
‫And now, without any further ado, let's go find those doggos.