All right.
So we've seen this little while actually you might not have seen this before but I thought I'd make
a quick video on what to do if you get this runtime disconnected message right down at the end of the
notebook.
So we've just saved and loaded a model.
So a pretty safe model and a loaded model.
But now since our runtime is disconnected in Google Ecolab we're going to have to reconnect and then
rerun some of the variables we've run up the top to get access to them.
So let me just show you what to do.
So if I reconnect we're gonna have to wait for this to load up shouldn't take too long.
And as you can see next we're pretty far on the project cause next step for us is training a model on
the forward data but if we try to access the full data as you'll see in a second initializing mountain
Google Drive getting our data back we're connected again.
So before we saved our images in X or if you're watching this before we get to this actual part just
know that our data is in X and our labels are m y but right now they're not defined.
So because our runtime disconnected it means we're gonna go have to go right back up to the top of the
notebook and this is a beautiful thing about Google Calabresi you can go right up the top and we're
gonna have to rerun these so we can have to report tend to flow to we're going to have to report tend
to flow and tend to flow hub
there we go.
We're gonna have to get back our labels CSC.
So just all of the variables that we've had later on in the notebook we're gonna have to rerun them
we don't have to look at this image we've already done that again if you're watching this in an earlier
video you'll see what happens as we get through the notebook we do need file names we do need to check
this make sure it's okay we don't need to view one more image so this is a kind of workflow you might
have to do if you're working through your notebook and you take a break like I just have and it's real
runtime is disconnected
length labels so we're just re instantiating all the variables we're gonna need later on and as you
get a bit more practice working with these kind of workflows you might function eyes what we're doing
right now so that you can just run one cell and it sets up all of these which is what we've tried to
do later on and you'll see pretty shortly that for things like loading our model we can just run our
load model function here's where we want because we want to try to model on the full data we need our
x and y variables a.k.a. x is just file names to the training data and Y labels.
Remember here watching this early on.
Don't worry we're going to go through this but I'm just showing you the kind of things you'll have to
do if your runtime disconnects itself which it will after an extended period of time away from Google
collab
beautiful there's a lot of stuff that we don't have to run mostly the functions is what we're after.
So let's just keep going through this.
I'm just rerunning all of these cells will need to create training in we don't need to look at data
batches so let's comment out this cell
we need to run this
beautiful.
We could go run all by just going runtime run all but I just want to show you step by step what's happening
you get something like this this usually fix itself if not just click more info and have a read of of
what's actually going on
early stopping callback we do need that print GPO available make sure it's available we need the trained
model function we actually don't need to try and another model.
So what we'll do is we'll comment out that we don't need to look at tensor board just yet and we don't
need to make these predictions.
We do need get pred label we do need on batch ify we do need plop Red do you need plot prep camp don't
need to rerun that and we do need save model load model and now as long as Load model runs we should
be able to load a previously trained model
this one loaded 1000 image models should run so if we go load in a model
now remember this is just the kind of workflow you'll have to do if you're runtime disconnects which
it will if you take a break and you should be taking breaks it's important
we just might speed the video up make sure that everything's running and we'll come back once this cell
is loaded and run
wonderful.
So now we've loaded a model from our saved models directory we come up in here models this videos from
the future remember so we've got dog vision and then inside dog vision every time you reconnect to a
new runtime it's going to take a while to load drive as things get stored in Google's machine so we're
loading it from models and now we should be able to evaluate
and we should have X and Y which is our full dataset
beautiful same results as the original model and now X and Y are re instantiated so that's just a workflow
you might have to take if your runtime disconnects and you're pretty far on in the notebook make sure
you've got all the variables that you need loaded I'm gonna now try to model on the full data but remember
if you're not up to this part just yet don't worry too much are going to cover it in subsequent videos
I just thought I'd put this one in to show you what it looks like if you're pretty far on in the project
and you have to restart your runtime so I'll see in the future videos.