‫Now we've got our data ready in our CoLab notebook and in Google Drive.
‫Let's clean up our notebook and get it.
‫Get it more set up towards our steps that we take in a new project system.
‫So what we've done, we've got CoLab, we've created a new project folder, we've got our data in there.
‫We actually don't really need to create an environment of tools because CoLab already has a lot of them
‫installed for us.
‫Let's try to import some anyway, because what are we doing?
‫We're working with TensorFlow and this is what we're doing with getting our data into tenses.
‫Yes, we're going to use TensorFlow for that and we're going to use TensorFlow Hub to pick a model.
‫How about we get our notebooks set up for those, too, in this video?
‫That sounds like a good idea.
‫We go back to CoLab.
‫What we can do, we can pretty up this because we don't need to run this zip command.
‫We could delete the cell or we'll just comment it out for now.
‫So run that.
‫We can close this down.
‫Get rid of that.
‫Really just tidying up our notebook, getting it ready.
‫What we might do is add a text cell.
‫And we're going to move that up there and I'm going to put the title in this.
‫So we'll go I'm going to put a little emoji because it's nice and fun.
‫So we'll go end to end.
‫Multiclass dog breed classification and go.
‫This notebook builds an end to end.
‫Multiclass image classifier using TensorFlow 2.0 and TensorFlow hub.
‫Wonderful.
‫And so let's get our little headings up in here.
‫So problem.
‫Data evaluation and then features.
‫So this is again from our six step workflow.
‫So we might put in here one to.
‫Three.
‫For.
‫So problem is identifying the breed of a dog given an image of a dog.
‫Now there's 120 different dogs.
‫I don't know if you can identify that many breeds, but I certainly can't.
‫So imagine this happened to me the other day, right?
‫I was sitting at the cafe and a dog walks past and I can't even remember the breed name, but someone
‫next to me said, Oh, that's let's make one up.
‫That's an Australian terrier.
‫Well, that makes sense because I'm an Australian.
‫That's an Australian terrier.
‫I'm like, Wow.
‫How did they know that?
‫And then I realized I only know about three dog breeds like German Shepherd, Labrador, Beagle.
‫I only got that one because I'm reading that.
‫And so this is what dog vision could be used for if we were trying to build something that could identify.
‫If I was sitting at that cafe and took a photo of that dog, could my machine learning model the one
‫that we're going to build, tell me what breed it was.
‫So that's our problem.
‫It's like that's our statement.
‫When I'm sitting at the cafe and I take a photo of a dog, I want to know what breed of dog it is.
‫That's our problem.
‫We're putting it in real life terms, right?
‫And now where's our data?
‫We can get our data.
‫We'll just put a link here from Kaggle.
‫So the data we're using is from Kyle's dog breed identification competition.
‫And we'll put a link here.
‫Evaluation.
‫What is our evaluation?
‫So in our head, I want you to think about this before we even look at Kaggle, because we're working
‫on classification.
‫What is a good evaluation metric for how well our dog vision is performing?
‫Well, one of the default metrics for classification is accuracy, right?
‫So if we could get it pretty accurate at predicting what dog is in a photo, that's a pretty good metric.
‫But let's see what Kaggle says.
‫So if we go to overview evaluation.
‫Submissions are evaluated on multiclass log loss.
‫Hmm.
‫What is that?
‫Between the predicted probability and the observed target?
‫Well, there's a link here, so let's click that.
‫Malte Well, och, well, these are things you're going to have to deal with in real life, right?
‫You're never always going to go down the right path for o4.
‫And I like how they've done that with data there.
‫Well, multiclass log loss.
‫Let's have a look at the example.
‫We've got ID, which is this long string.
‫We've got a dog breed here.
‫Ethan Pincher.
‫Don't mock me for not being able to pronounce that Afghan hand.
‫That's an easier one to pronounce.
‫And 0.0083.
‫0.0.
‫Hmm.
‫These look like output prediction probabilities of a model and which they are.
‫So here we go.
‫If I could just read this.
‫Remember, if in doubt, read the documentation or run the code either or for each image in the test
‫set, you must predict a probability for each of the different breeds.
‫The file should contain a header and have the following format.
‫Okay, so this is what we're working towards.
‫If we wanted to make a submission.
‫This competition is closed, so it's a playground prediction competition.
‫But we can still make a submission.
‫Let's work towards that.
‫And that's the file type we need.
‫All right, so if we go back, where were we?
‫Dog vision evaluation.
‫The evaluation is a file with prediction probabilities for each dog breed of h test image.
‫And then we go here.
‫We'll copy that, put it into dog vision.
‫So if we ever needed to come back, we can.
‫And then some features of the data.
‫Well, we know that the images, so they're unstructured.
‫But let's have a look at our data.
‫We have 120 different breeds of dogs, so there's 120 different classes.
‫I'm going to copy that.
‫Some information about the data.
‫We're dealing with images.
‫And this is the way I want you to start thinking about different projects.
‫Right.
‫You don't this doesn't have to be like formal by the time you've had some practice with problems.
‫You won't need to write this out.
‫But this is a good habit to have, is that you're communicating your work not just to others.
‫Like if we were to share this notebook.
‫That's a really cool thing about CoLab as well.
‫You can share them, but it's communicating it to yourself so you know what you're working towards.
‫Unstructured data.
‫And so unstructured data is just anything that isn't in a data frame.
‫So no rows and columns.
‫We're dealing with images, unstructured data.
‫So it's probably best we use deep learning slash transfer learning, which is what this project is all
‫about.
‫What else is there about the data?
‫There are 120 breeds of dogs, and because it's multiclass classification, this means there are 120
‫different classes.
‫Now, if there were only two dog breeds, it would be binary classification.
‫If you remember our project on heart disease, that was binary classification.
‫So whether someone has heart disease or not.
‫So if we come back.
‫Label CSB so 10,222 unique values OC.
‫So that means I'm guessing there is 10,222 different images.
‫Okay.
‫So 10,000 training images.
‫You know, what we might be able to do is if we have this locally is go command I on that.
‫Bomb.
‫Look at that.
‫Thank you, Mac.
‫OS, you might be able to do this in windows.
‫I'm not entirely sure.
‫We've got 10,358 items and let's see if my theory was correct.
‫10,223 in train.
‫Hmm.
‫I wonder what that is.
‫Where the little discrepancy is from there.
‫That's alright.
‫We'll figure it out.
‫We're not worried about that now.
‫We're cooks, not chemists.
‫There are around 10,000.
‫Plus images in the training set.
‫There are around 10,000 plus images in the test set.
‫These images have labels.
‫These images have no labels because we'll want to predict them.
‫Wonderful.
‫So this is us setting up our project space.
‫And now I know at the beginning we kind of said we're going to import TensorFlow, but what's more important
‫is getting our heads around what problem we're actually trying to solve before we start bringing in
‫our tooling.
‫So if we go here, unzip the uploaded data into Google Drive, wonderful.
‫So I'm going to delete this cell.
‫What should we do now?
‫We might as well import TensorFlow because that's what we're working with, right?
‫We come back to our keynote.
‫This is our workflow.
‫We're working with unstructured data.
‫So get our data ready.
‫We've got it uploaded into Google Drive.
‫Correct.
‫Get it into tenses.
‫We're going to use TensorFlow for that and TensorFlow hub.
‫So that's what we might is will try and do.
‫We might as well try and import TensorFlow.
‫And TensorFlow hub.
‫How might we do that?
‫So you could do this.
‫If you have any question, you go how to import TensorFlow.
‫I already know.
‫So I'm just going to show you.
‫But that's just an example.
‫Actually we're working in CoLab, so it's better to be a bit more specific in Google CoLab.
‫That's just what I would Google.
‫I'll look at that.
‫A great video.
‫Oh, that's the old TensorFlow logo.
‫So if you see that logo, that's the old TensorFlow logo.
‫We're dealing with TensorFlow 2.0.
‫So we want to.
‫Import TensorFlow
‫into CoLab.
‫So let's put a little heading here.
‫Get our workspace ready.
‫Now, the beautiful thing about CoLab is, well, little tidbit is that once you do headings in their
‫own cells, you get this little section over here so we could go right to the top or we could go back
‫to this section.
‫So that's what we're going to do throughout is just navigate through this.
‫So we want to get our workspace ready.
‫The import nice and simple import tensorflow as TF if you have a CTF just like numpy is NP pandas as
‫PD tf is short for tensorflow.
‫We want to go print TF version.
‫And now this is going to tell us what version because we're after TensorFlow two on look at this Google
‫code lab autocomplete on tap.
‫Thank you.
‫But we're going to try and avoid using autocomplete because we want to practice writing the code ourselves.
‫Let's see what happens.
‫Oh.
‫Read text.
‫Too many underscores.
‫That's the first mistake.
‫Oh, we missed out on that red text.
‫That's all right.
‫I'm going to show you.
‫I'm going to restart my runtime.
‫Remember, if you ever see what I just did, if you ever see this come up, you might have to go to
‫runtime, restart runtime.
‫But I'm going to just show you we don't have to worry about that.
‫So because we've already unzipped our files, show you this red text.
‫Hopefully it comes up again.
‫Boom.
‫That's what we are after.
‫So the default version of TensorFlow and co lab will soon switch to TensorFlow two point X.
‫That's what we want.
‫The new version of TensorFlow.
‫See?
‫You might if you're watching this video in the future, you might already have TensorFlow two point
‫X or two point whatever.
‫We need to point something.
‫I because I'm running this.
‫It hasn't switched over yet in CoLab, so I'm using TF 1.15, which is not what we want.
‫We want the 2.0 version.
‫I'll see you in the next video.
‫I'll show you a little trick if you don't have TensorFlow 2.0 yet.
‫If you do, keep going, skip the next video.
‫But if you don't watch the next video.