‫Alright.
‫So we've seen this little well 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 pre saved model and a loaded model.
‫But now, since our runtime is disconnected in Google CoLab, 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 going to 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 because next step for us is training a model
‫on the full data.
‫But if we try to access the full data, as you'll see in a second, initializing, mounting 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 in Y.
‫But right now they're not defined.
‫So because our runtime disconnected, it means we're going to go have to go right back up to the top
‫of the notebook.
‫This is a beautiful thing about Google CoLab is that you can go right up the top and we're going to
‫have to rerun these.
‫So we're going to have to re import TensorFlow, too.
‫We're going to have to re-import TensorFlow and TensorFlow hub.
‫There we go.
‫We're going to have to get back our labels CSV.
‫So just all of the variables that we've had later on in the notebook, we're going to 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 the 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 going to need later on.
‫And as you get a bit more practice working with these kind of workflows, you might function ize what
‫we're doing right now so that you could 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 the things like loading our model, we can just run our load model
‫function.
‫Here's where we want because we want to try and 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 are labels.
‫Remember, if you're 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 you're runtime disconnects itself,
‫which it will after an extended period of time away from Google CoLab.
‫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.
‫We'll need to create training and.
‫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.
‫Run time, 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 GPU available, make sure it's available.
‫We need the train model function.
‫We actually don't need to train 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 spread label.
‫We do need un bacha fei.
‫We do need plot thread.
‫Do you need plot thread conf.
‫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 model 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 your 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 model's directory.
‫We come up in here, models.
‫This video is 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 data set.
‫Beautiful same results is 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 going to now try and model in the full data, but remember, if you're not up to this part just
‫yet, don't worry too much.
‫We're 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 you in the future videos.