1 00:00:00,400 --> 00:00:00,850 All right. 2 00:00:00,960 --> 00:00:05,640 So we've seen this little while actually you might not have seen this before but I thought I'd make 3 00:00:05,640 --> 00:00:12,120 a quick video on what to do if you get this runtime disconnected message right down at the end of the 4 00:00:12,120 --> 00:00:12,690 notebook. 5 00:00:13,020 --> 00:00:17,160 So we've just saved and loaded a model. 6 00:00:17,220 --> 00:00:19,520 So a pretty safe model and a loaded model. 7 00:00:19,830 --> 00:00:26,580 But now since our runtime is disconnected in Google Ecolab we're going to have to reconnect and then 8 00:00:26,580 --> 00:00:30,840 rerun some of the variables we've run up the top to get access to them. 9 00:00:30,840 --> 00:00:33,040 So let me just show you what to do. 10 00:00:33,210 --> 00:00:36,660 So if I reconnect we're gonna have to wait for this to load up shouldn't take too long. 11 00:00:37,840 --> 00:00:43,140 And as you can see next we're pretty far on the project cause next step for us is training a model on 12 00:00:43,140 --> 00:00:52,050 the forward data but if we try to access the full data as you'll see in a second initializing mountain 13 00:00:52,050 --> 00:00:56,650 Google Drive getting our data back we're connected again. 14 00:00:56,670 --> 00:01:04,080 So before we saved our images in X or if you're watching this before we get to this actual part just 15 00:01:04,080 --> 00:01:11,830 know that our data is in X and our labels are m y but right now they're not defined. 16 00:01:12,010 --> 00:01:17,020 So because our runtime disconnected it means we're gonna go have to go right back up to the top of the 17 00:01:17,020 --> 00:01:23,570 notebook and this is a beautiful thing about Google Calabresi you can go right up the top and we're 18 00:01:23,570 --> 00:01:29,330 gonna have to rerun these so we can have to report tend to flow to we're going to have to report tend 19 00:01:29,330 --> 00:01:31,640 to flow and tend to flow hub 20 00:01:37,750 --> 00:01:38,590 there we go. 21 00:01:38,590 --> 00:01:42,140 We're gonna have to get back our labels CSC. 22 00:01:42,580 --> 00:01:47,110 So just all of the variables that we've had later on in the notebook we're gonna have to rerun them 23 00:01:47,110 --> 00:01:53,800 we don't have to look at this image we've already done that again if you're watching this in an earlier 24 00:01:53,800 --> 00:02:03,010 video you'll see what happens as we get through the notebook we do need file names we do need to check 25 00:02:03,070 --> 00:02:09,170 this make sure it's okay we don't need to view one more image so this is a kind of workflow you might 26 00:02:09,170 --> 00:02:17,810 have to do if you're working through your notebook and you take a break like I just have and it's real 27 00:02:17,810 --> 00:02:19,190 runtime is disconnected 28 00:02:23,900 --> 00:02:31,910 length labels so we're just re instantiating all the variables we're gonna need later on and as you 29 00:02:31,910 --> 00:02:37,730 get a bit more practice working with these kind of workflows you might function eyes what we're doing 30 00:02:37,730 --> 00:02:44,520 right now so that you can just run one cell and it sets up all of these which is what we've tried to 31 00:02:44,520 --> 00:02:49,350 do later on and you'll see pretty shortly that for things like loading our model we can just run our 32 00:02:49,350 --> 00:02:55,070 load model function here's where we want because we want to try to model on the full data we need our 33 00:02:55,080 --> 00:03:01,590 x and y variables a.k.a. x is just file names to the training data and Y labels. 34 00:03:01,590 --> 00:03:03,360 Remember here watching this early on. 35 00:03:03,360 --> 00:03:08,770 Don't worry we're going to go through this but I'm just showing you the kind of things you'll have to 36 00:03:08,770 --> 00:03:15,930 do if your runtime disconnects itself which it will after an extended period of time away from Google 37 00:03:15,940 --> 00:03:16,510 collab 38 00:03:21,610 --> 00:03:28,100 beautiful there's a lot of stuff that we don't have to run mostly the functions is what we're after. 39 00:03:28,330 --> 00:03:30,490 So let's just keep going through this. 40 00:03:30,670 --> 00:03:37,370 I'm just rerunning all of these cells will need to create training in we don't need to look at data 41 00:03:37,370 --> 00:03:39,890 batches so let's comment out this cell 42 00:03:47,690 --> 00:03:48,830 we need to run this 43 00:03:52,540 --> 00:03:53,110 beautiful. 44 00:03:53,110 --> 00:03:59,380 We could go run all by just going runtime run all but I just want to show you step by step what's happening 45 00:03:59,380 --> 00:04:04,720 you get something like this this usually fix itself if not just click more info and have a read of of 46 00:04:04,720 --> 00:04:05,920 what's actually going on 47 00:04:08,750 --> 00:04:15,640 early stopping callback we do need that print GPO available make sure it's available we need the trained 48 00:04:15,640 --> 00:04:19,600 model function we actually don't need to try and another model. 49 00:04:19,810 --> 00:04:29,110 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 50 00:04:29,110 --> 00:04:31,600 need to make these predictions. 51 00:04:31,630 --> 00:04:43,650 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 52 00:04:43,650 --> 00:04:51,600 need to rerun that and we do need save model load model and now as long as Load model runs we should 53 00:04:51,600 --> 00:04:53,820 be able to load a previously trained model 54 00:04:58,190 --> 00:05:05,030 this one loaded 1000 image models should run so if we go load in a model 55 00:05:10,210 --> 00:05:14,750 now remember this is just the kind of workflow you'll have to do if you're runtime disconnects which 56 00:05:14,750 --> 00:05:19,640 it will if you take a break and you should be taking breaks it's important 57 00:05:27,010 --> 00:05:33,120 we just might speed the video up make sure that everything's running and we'll come back once this cell 58 00:05:33,120 --> 00:05:34,020 is loaded and run 59 00:05:37,130 --> 00:05:37,750 wonderful. 60 00:05:37,820 --> 00:05:47,650 So now we've loaded a model from our saved models directory we come up in here models this videos from 61 00:05:47,650 --> 00:05:54,370 the future remember so we've got dog vision and then inside dog vision every time you reconnect to a 62 00:05:54,370 --> 00:05:59,470 new runtime it's going to take a while to load drive as things get stored in Google's machine so we're 63 00:05:59,470 --> 00:06:03,430 loading it from models and now we should be able to evaluate 64 00:06:06,650 --> 00:06:10,340 and we should have X and Y which is our full dataset 65 00:06:16,780 --> 00:06:24,580 beautiful same results as the original model and now X and Y are re instantiated so that's just a workflow 66 00:06:24,580 --> 00:06:28,480 you might have to take if your runtime disconnects and you're pretty far on in the notebook make sure 67 00:06:28,480 --> 00:06:34,450 you've got all the variables that you need loaded I'm gonna now try to model on the full data but remember 68 00:06:34,480 --> 00:06:38,800 if you're not up to this part just yet don't worry too much are going to cover it in subsequent videos 69 00:06:39,100 --> 00:06:44,350 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 70 00:06:44,710 --> 00:06:49,330 and you have to restart your runtime so I'll see in the future videos.