‫Welcome back.
‫Now, hopefully you've had a chance to check out TensorFlow hub.
‫If not, that's okay.
‫That's exactly what we're going to check out now.
‫So let's go here.
‫TensorFlow hub.
‫Search that up.
‫Boom.
‫TensorFlow hub.
‫Let's read about it.
‫So TensorFlow Hub is a library for reusable machine learning models.
‫Ah.
‫Okay.
‫So TensorFlow Hub is a library for the publication discovery and a consumption of reusable parts of
‫machine learning models.
‫Beautiful is a self contained piece of TensorFlow graph along with its weights and assets aka patterns.
‫So the patterns are previous model has learned that can be used reused across different tasks in a process
‫known as transfer learning.
‫So transfer learning can train a model with a smaller data set, wonderful, improve generalization
‫and speed up training.
‫That is what we are interested in.
‫And look how quickly you can get started by using a TensorFlow model.
‫How beautiful is that?
‫And so this is TensorFlow hub.
‫And now TensorFlow is one of the biggest deep learning frameworks that's out there, and it's the one
‫that we're using right now.
‫But I want to also show you, there's also PyTorch, hub and model zoo and papers with code.
‫Don't worry, I'll link all of these.
‫So model zoo.
‫Deep learning code and pre-trained models.
‫PyTorch if you were using pytorch.
‫So let's just let all these loads unlike socket learn where you remember we have the psychic learn machine
‫learning map.
‫If we go here.
‫So unlike Psychic Loan, which has been pretty established for a fairly long time using more traditional
‫machine learning techniques, we've seen this map before and the psychic loan section.
‫One of these is kind of yet to be created for deep learning and neural networks.
‫And remember, neural network is just another type of machine learning module.
‫And so this is why we have.
‫These type of resources like PyTorch, hub, TensorFlow, hub, model, zoo, open source, deep learning
‫code and Pre-trained models.
‫Papers with code papers with code is like the latest trending research of the deep learning field.
‫And oftentimes you'll have the paper, so an academic paper and the code to go along with it on GitHub,
‫which is absolutely amazing.
‫And so these are some of the resources you should be coming to when you're first getting started.
‫Exactly like what we're doing in dog vision, where we're going to find out how to choose a URL on a
‫second.
‫But because the book on deep learning and machine learning is still being written.
‫Learning to build things from scratch when you first start is great approach, but instead the approach
‫we're taking is focusing on working on a project first.
‫And then if you wanted to dive deeper to get anything like that's going on behind the scenes of what
‫we're doing.
‫You can do that.
‫So don't let me control your zoom level as how far we're going in terms of depth.
‫Once you start to solve problems like we're doing with dog vision working end to end, you won't be
‫able to help yourself.
‫You'll be compelled.
‫You want to dive deeper and figure out how to improve what we're working on.
‫That's the best thing that I can kind of impart on you, is rather than showing you how to do every
‫single thing, which would take a whole documentation, a course, that's four times as long as this
‫one and a lot more.
‫It's better to just spark an interest.
‫And then on your own self search and self discovery, you find resources like these and try and implement
‫them on your own problems.
‫So that's what we're focused on in Dog Vision is building an end to end project, and then you can take
‫what you've learned in dog vision.
‫Go to these resources here, model zoo papers with code, and try and apply what you've learned to your
‫own project.
‫And then once you do, once you get that little taste of of working end to end on a project, you'll
‫really start to want to go, Hey, I need to figure out what's going on behind the scenes then.
‫And then your knowledge will will just grow from within itself, which is a beautiful thing.
‫So that's a kind of long winded philosophical speech on our training philosophy here.
‫Let's see what we can do with TensorFlow hub.
‫So hello and welcome to TensorFlow Hub.
‫Beautiful.
‫So there's a bunch of tutorials about how TensorFlow works, but you can browse by problem domain.
‫Ah, this is what I was talking about.
‫This is why it's so important to be able to define your problem, like way back up in the top of our
‫notebook.
‫What's our problem?
‫Identify the breed of a dog given an image of a dog.
‫Okay.
‫Nice and simple.
‫Now, this is a beautiful thing about CoLab, right?
‫You can just jump back and forth between your notebook.
‫So let's go to TensorFlow hub image.
‫Beautiful.
‫And what do we see here?
‫While this could look like a whole bunch of jargon.
‫What's happening here?
‫But let's pay attention to what's going on.
‫On the left.
‫We've got image augmentation.
‫Is any of these tags our problem?
‫Augmentation.
‫No classification.
‫Yes.
‫Image feature vector generator detection image.
‫Others are in an agent.
‫Let's just look at image classification problems.
‫All right.
‫And so what's going on here?
‫Well, this is kind of like the TensorFlow version of the socket learn machine learning map.
‫Again, this is still in development phase.
‫So just a couple of years ago, this thing didn't even exist.
‫So this is how beautiful the field is getting.
‫Now we're starting to go, okay, these are all machine learning models.
‫I just gave that away, that spoiler.
‫And these are ones that work pretty good.
‫So rather than retrain a machine learning model from scratch every time and take up a bunch of computing
‫power and a bunch of time and a bunch of resources, let's just publish all the patterns that we find
‫in previously built machine learning models so that other people can apply them to their own problem.
‫What could we find?
‫Let's have a look at architecture.
‫Architecture is another word for machine learning model or neural network architecture.
‫With no networks, you'll probably find that they have some pretty fancy names like Inception Rez Net
‫V2.
‫It sounds like a crazy movie.
‫Resonant v 150.
‫Resonant V 250 And now I want to show you something about Resonant.
‫We're actually not going to use this one, but I want to just show you the power of of what it's like.
‫So if we click on here.
‫This is going to give us a link copied to Clipboard.
‫That's as easy as it is using a pre-trained resonant model.
‫We can copy that URL or we could download the model.
‫But if we go here.
‫This is how we create a resonant model.
‫The reason why I want to show you Resonant, especially resonant 50 is that Tesla use resonant 50 backbones.
‫This is why transfer learning is so important to to understand is because if we go here this is resonant.
‫V 250 I took this slide here from a talk called PyTorch at Tesla by Andre Carpathia.
‫You can watch it there.
‫I'll be sure to link it, but their computer vision systems in their Tesla cars use resonant 50 like
‫diluted backbones.
‫Of course they'll have custom layers and whatnot.
‫But what I'm saying is, is that we have access to very similar machine learning models as what are
‫you being used in production at companies like Tesla?
‫So that's why it's important to be aware of these resources that are available to us.
‫And I know that this says PyTorch, but the beautiful thing is, is if you come up to PyTorch Hub,
‫you could probably find it.
‫There you go.
‫Resonant 101.
‫All that sort of stuff.
‫Now we're working with TensorFlow.
‫Let's go back to here.
‫I have the model in mind that we want to use, so we go architecture.
‫This is going to take a little bit of exploring on your behalf.
‫But what you can essentially assume here is that the higher the number, the better the model.
‫But it also the tradeoff there is, the higher the number, the longer it takes to to train.
‫So mobile net, this is your homework for this video.
‫It's to Google mobile net.
‫Just look it up and just read about it.
‫So we're going to use this one here.
‫Image classification.
‫So if we have a read about this.
‫TF2 safe model.
‫This is a safe model in TensorFlow to format it requires using TensorFlow two or 1.15 and higher.
‫So that's what we're using, TensorFlow two.
‫Beautiful.
‫So mobile net v2 is a family of neural network architectures for efficient on device, image, classification
‫and related task.
‫Originally published by.
‫So that's where it's originally published.
‫Now, remember right back at the start what our problem is.
‫I was sitting at the cafe the other day.
‫This beautiful dog came walking past and the friend I was with said, That's an Australian terrier.
‫And I was like, Wow, I wish I could take a photo of that dog on my phone and figure out what kind
‫of dog it was.
‫So this is where we come to Mobile Net.
‫Wow.
‫It's efficient on device image classification.
‫That's exactly what I want to do with dog vision.
‫Beautiful.
‫So we can come here and we can see it's got some guidelines of what we can do.
‫This is your homework as well, is to read through this even if you don't understand it at first.
‫Go, just have a read through it and we'll leave this link in the resources section.
‫By the way, this is where we got that batch input shape.
‫There we go.
‫Two, two, four, two, two, four, three.
‫Little number on the end here.
‫But if you were reading through this, that's where you would figure that out.
‫So let's copy this to the clipboard.
‫Come back, and this is our model.
‫Earl, we're going to change that into a string.
‫And.
‫We're going to put in here from TensorFlow hub and then we'll put a link to TensorFlow hub.
‫Wonderful.
‫Come back to dog vision.
‫There we go.
‫So what if we got set up now?
‫So if we come back to our keynote, this is what we've set up.
‫We've picked a model from TensorFlow hub to suit our problem.
‫Remember, we went through our problem domain and we're working with images.
‫What we're focused on is our inputs.
‫We've done that.
‫We've got our data ready.
‫We turned it into tenses and we've chosen our machine learning algorithm.
‫Wonderful.
‫And now we've got our output shape correct.
‫Now we've got these three key criteria.
‫We have to work out how we can use them all together.
‫The next process is putting them together in the form of a function that's going to create a model for
‫us and return it so that we can fit it to our data set.
‫So let's get started on that in the next video.
‫But remember, for now, your homework is to read up about TensorFlow Hub and to check out mobile net
‫v21 30 224.
‫I'll link both of these and these other resources in the resources section.