Awesome.
So now if you print out this little line here it should print out something like this.
TMF version I'm using two point 1.0 but if yours is to point something above that should be fine unless
tensor of love broken all the code that we're working on here which is unlikely but I should put up
in here getting our workspace ready I should put out but we're actually going to do.
So we need to import tensor flow to point X. We've done that.
We can put a little checkmark beside that.
I wonder if we can I'm going to put an emerging next to that.
There we go green tech.
Wonderful.
We need to import tens of flow hub.
And we also need to make sure we're using a GP you remember in the introductory lecture we said we're
gonna need a GPO because when we're working with unstructured data oftentimes the patterns are a lot
more vast and running a no network a special kind of machine learning model takes a lot more compute
power than what a traditional machine learning model like something like a random forest.
We ran in the past has or at least in our case because we're dealing with a lot more data this time.
We've got ten thousand plus images nearly eight gigabytes worth of data.
So whereas our previous CSO these were only a couple of megabytes or kilobytes even less than that.
So we've import intensive low to point X.
Now we need to figure out how to import tens if low hub.
Okay.
And make sure we're using a GP you.
And now if we come back the reason why we need tens if not hub is because this is where we're gonna
pick our model from.
And the reason why we need sense of flow is of course to build this whole pipeline and to get our data
into tenses.
So we're still getting our workspace ready let's import tend to flow hub.
So we'll put here.
All right a little comment.
Import necessary tools we could import a few more that we'll use but we might import them as we go.
But I just want to make these two known right at the top because these are the main ones.
This entire project.
So import tend to flow hub it's already installed in collab which is beautiful.
Another great reason for using that as hub.
That's the traditional tensor flow hub way of importing it.
Then we can also go print TAF hub version same way
hub.
I'm just going to school version and it's going to go wonderful.
And then we're going to write a little line here now that we've import intensive flow which will help
us check if there's a GP you available because tend flow what it does is it allows us to write Python
code which gets executed on a jeep use a tensor flow underneath all the tensor flow code that we write
calls another library which allows our code to be run on a GP you in turn make really fast numerical
calculation so let's go here check for GP you availability and now another reason why we're using co
lab is because Google kindly provide free GP you access to us so my laptop if I was to try run this
project on my laptop it probably would probably burn out before it could even figure it out it could
run for days on end but what we'll see as we eventually get to it because we're going to be using a
GP you it runs a lot faster and even then it's going to take half an hour or so we're getting ahead
of ourselves and you'll come on let's just check if the GP is available so I'll show you a little bit
of code you can use its tensor flow based to see if a GP who is available now going to run out a little
success message because I love seeing that we have access to a GP you and you should too to be honest
because this is what's caused the deep learning revolution is the access to GP use now what is this
little function doing here.
Well I want you to try and imagine what is it doing accessing tens intensive light tens of first configuration
and it's going to list the physical devices and that literally means what you might think it means what
physical devices are powering this python 3 Google compute engine back it so we can see Ram gigabytes
one point one one and we've got disk what else is there.
We are most concerned with the GPO so we're just gonna pass the GP you string this is people who have
written tend to flow have had this problem before and they've gone let's just make this easy to check
if we've got a GP ls not available unhappy vice so why run.
Let's see what happens.
Oh well we do have tents flow hub.
That's beautiful and we got a GP you not available and you might be asking what is tend to flow.
Well this is where I'd encourage you to do your own research.
What is going to go through it in a moment but you go what is tens of low job search that up have a
quick rate if you're if you want to check it out but don't worry about that.
Now what we're focused on is getting a GP view available.
Mm hmm.
All right.
How do we do that.
Well let's figure it out.
So if we get to runtime we can go to change runtime time.
Now again this is our runtime here is a lot of things that look a bit complicated so connect to a hosted
runtime.
Okay let's go runtime change runtime type this is how we get access to a GPO.
We've got runtime type Python 3.
I'm recording this in post 2020 so Python 2 is no longer supported so always by 3 that means Python
2 just won't be getting any more updates.
It'll probably still run through our hardware accelerator.
Let's click this.
What does this mean.
Let's zoom in what type of GOP user available in collab.
Beautiful.
So this is necessary for Ecolab the GP use available in collab often include video Katie's t fours P
fours and P1 hundreds.
Again if you're curious what these are Google and a video.
Katie Nvidia T for number of people in a video.
One hundred.
Long story short is that these are different types of NVIDIA GP use the video is a GP you maker like
Intel is a CPA maker and these are just different models of chips.
So let's go in here.
We're going to choose a GP you can also choose TPA but we're focused on GP for now.
TPA requires a little bit more setup with the code but that could be again something that you could
look up yourself how to use a TPA you in collab.
That's a bit of a rabbit hole you can get down but let's go GP you click save again to do that runtime
change runtime type GP you and you'll see all we've remount at Google Drive.
And this is changing.
Look at that oh yeah connected to Python 3 Google compute engine back end GP you wonderful.
So what we have to do now is because we've just restarted our runtime we're going to have to if you've
already got access to tensor flow 2.0 like the output of this cell intensifier 2.0 you can just rerun
this cell.
But because I don't have of 2.0 by default I'm going to have to rerun this cell here.
So we run this testified to point X selected now fingers crossed if we have a GP you available meaning
superfast numerical computing this little output message should change because this little piece of
code is gonna check to see if a GP Q is available which it looks like it is.
Let's run this
Oh yes.
So now we have a GPO available.
We have tensor flow available and we have tensor flow hub.
Let's go have a look at our keynote where we're up to we've done this.
This is what we've done except we've built it all up and collapse.
So now we're ready to actually go to our workflow I should put the step zero in here is get our workspace
ready.
But this is really exciting.
We can now get our data ready by turning it into tenses.
So come back to our notebook make sure if you run this cell you've got access to a GP you because the
code we run later on will utilize the GPO and make sure your tensor flow version is higher than two
point X and your hub version.
It doesn't really matter.
But if it's zero point seven or above that's a good thing.
So I'll see you in the next video.
Let's start figuring out how to get our data ready.