1
00:00:00,180 --> 00:00:05,940
So now we've trained our model and we've got all the results displayed above during the training process.

2
00:00:06,540 --> 00:00:09,510
How would we visualize these, this these results now?

3
00:00:10,080 --> 00:00:16,140
So remember when we did model that fit, we put history equal to model fit, and I said that saves us

4
00:00:16,140 --> 00:00:20,580
information into a dictionary file after each book.

5
00:00:20,820 --> 00:00:22,620
Well, that's and that's true.

6
00:00:23,040 --> 00:00:26,520
And that's and that gives us the ability now to plot our data.

7
00:00:26,550 --> 00:00:28,560
So let's take a look at how we plot this data here.

8
00:00:29,070 --> 00:00:36,240
So by inputting metadata Typekit as BLT, we get we physically do that to does our plotting library.

9
00:00:37,170 --> 00:00:42,170
And then we just use the history dot history to get the history dictionary that this is.

10
00:00:42,180 --> 00:00:48,120
This returns a dictionary storing the results, which we can inspect if you don't believe me.

11
00:00:48,810 --> 00:00:53,220
I just take a look at this could website and cut that.

12
00:00:54,430 --> 00:00:59,570
It's pasted in here, and that's piss this back and take a look at that variable.

13
00:00:59,590 --> 00:01:05,350
And you can see exactly as I said, we have accuracy and this is the accuracy after each of those 25

14
00:01:05,350 --> 00:01:05,880
epochs.

15
00:01:05,890 --> 00:01:11,440
As we keep going down, then we have lost and we have the validation, accuracy and validation loss.

16
00:01:11,950 --> 00:01:18,580
So it's just four keys in the dictionary, and each value is basically an array with 25 values inside

17
00:01:18,580 --> 00:01:18,880
of it.

18
00:01:19,210 --> 00:01:21,220
So it's a nice way to store the data.

19
00:01:21,760 --> 00:01:24,430
So to extract those values, we just do loss.

20
00:01:24,820 --> 00:01:25,330
We get it.

21
00:01:25,330 --> 00:01:29,620
We used a key loss here in asterisk predict to get the lowest values.

22
00:01:29,620 --> 00:01:31,810
This no becomes an array of those values.

23
00:01:32,320 --> 00:01:39,940
This becomes an area of the validation, lost values and we have the epochs just we just we know it's

24
00:01:39,940 --> 00:01:40,780
25 epochs.

25
00:01:41,320 --> 00:01:44,320
So we just create this range here with a lost values.

26
00:01:45,190 --> 00:01:47,830
And then we just do two line plots.

27
00:01:47,920 --> 00:01:49,520
We're blowing two lanes on the same graph.

28
00:01:49,540 --> 00:01:50,800
So that's why we do it this way.

29
00:01:51,400 --> 00:01:57,490
So we just plot the epochs plot validation, lost values, give it a label or title for that line.

30
00:01:57,580 --> 00:02:04,870
So we have the legend markers here and then we just set different markers, sizes and different.

31
00:02:05,410 --> 00:02:10,780
The plus sign in for four different styles of the marks, so we can see it's not really necessary to

32
00:02:10,780 --> 00:02:10,940
have.

33
00:02:11,110 --> 00:02:12,880
We didn't have to put it in, but it's nice.

34
00:02:13,690 --> 00:02:19,960
And then we just plot this graph in the end with labels, with the grid, with a legend, and we get

35
00:02:19,960 --> 00:02:20,890
this nice graph here.

36
00:02:21,010 --> 00:02:22,510
So what does this graph tell us?

37
00:02:23,080 --> 00:02:30,130
Well, this graph tells us that after the movie box, you can see how drastic our loss went down for

38
00:02:30,130 --> 00:02:32,590
both training and board validation.

39
00:02:33,010 --> 00:02:37,870
And in the end, the board went accordingly to get a pretty decent low values.

40
00:02:38,320 --> 00:02:41,440
That's generally what we want to see when training CNN.

41
00:02:41,860 --> 00:02:46,390
You want to see both your training loss, but most importantly, a validation loss going down to.

42
00:02:46,990 --> 00:02:49,930
It's not uncommon to get better results on the training get a set.

43
00:02:50,290 --> 00:02:52,510
In fact, in most cases, you probably would.

44
00:02:53,740 --> 00:02:56,410
That's because the validation is the unseen data.

45
00:02:56,410 --> 00:03:00,550
So we test how well your CNN general license to unseen data.

46
00:03:01,150 --> 00:03:09,040
So similarly, zoom back out we can do accuracy charts in much the same way we just accessed Excel accuracy

47
00:03:09,040 --> 00:03:12,430
values from the history dict dictionary.

48
00:03:13,180 --> 00:03:15,730
We create the same epochs right here.

49
00:03:16,210 --> 00:03:20,000
We just plot these things out and we get accuracy values here.

50
00:03:20,020 --> 00:03:20,500
And you can see that.

51
00:03:20,500 --> 00:03:26,620
Similarly, in the end, accuracy of the validation looks to be above, which is good.

52
00:03:26,710 --> 00:03:30,460
It's a very good sign that our model is performing as we want to do.

53
00:03:31,030 --> 00:03:36,340
So it's above the training accuracy, which is exactly what they just said, and that's a good sign.

54
00:03:36,610 --> 00:03:39,870
So you can see it's nice where we can plot these values.

55
00:03:39,880 --> 00:03:42,100
This is just one of the many ways we can do this.

56
00:03:42,460 --> 00:03:48,280
You can actually do this life during training with something like Tensor Board, but we won't be using

57
00:03:48,280 --> 00:03:51,490
TensorFlow much in this course and some of the object detector lessons.

58
00:03:51,880 --> 00:03:54,730
We will analyze the results with Tensor Board afterward.

59
00:03:55,120 --> 00:04:01,060
But for now, this is the easy and best way to do it and gives you a good understanding of what what's

60
00:04:01,060 --> 00:04:03,700
going on will stop there for now.

61
00:04:04,030 --> 00:04:08,950
And in the last section, we'll take a look at how we save our little models and then how we get some

62
00:04:08,950 --> 00:04:10,450
predictions out of that model.

63
00:04:10,900 --> 00:04:13,290
So I'll see you in the next section then.
