So now we've trained our model and we've got all the results displayed above during the training process.
How would we visualize these, this these results now?
So remember when we did model that fit, we put history equal to model fit, and I said that saves us
information into a dictionary file after each book.
Well, that's and that's true.
And that's and that gives us the ability now to plot our data.
So let's take a look at how we plot this data here.
So by inputting metadata Typekit as BLT, we get we physically do that to does our plotting library.
And then we just use the history dot history to get the history dictionary that this is.
This returns a dictionary storing the results, which we can inspect if you don't believe me.
I just take a look at this could website and cut that.
It's pasted in here, and that's piss this back and take a look at that variable.
And you can see exactly as I said, we have accuracy and this is the accuracy after each of those 25
epochs.
As we keep going down, then we have lost and we have the validation, accuracy and validation loss.
So it's just four keys in the dictionary, and each value is basically an array with 25 values inside
of it.
So it's a nice way to store the data.
So to extract those values, we just do loss.
We get it.
We used a key loss here in asterisk predict to get the lowest values.
This no becomes an array of those values.
This becomes an area of the validation, lost values and we have the epochs just we just we know it's
25 epochs.
So we just create this range here with a lost values.
And then we just do two line plots.
We're blowing two lanes on the same graph.
So that's why we do it this way.
So we just plot the epochs plot validation, lost values, give it a label or title for that line.
So we have the legend markers here and then we just set different markers, sizes and different.
The plus sign in for four different styles of the marks, so we can see it's not really necessary to
have.
We didn't have to put it in, but it's nice.
And then we just plot this graph in the end with labels, with the grid, with a legend, and we get
this nice graph here.
So what does this graph tell us?
Well, this graph tells us that after the movie box, you can see how drastic our loss went down for
both training and board validation.
And in the end, the board went accordingly to get a pretty decent low values.
That's generally what we want to see when training CNN.
You want to see both your training loss, but most importantly, a validation loss going down to.
It's not uncommon to get better results on the training get a set.
In fact, in most cases, you probably would.
That's because the validation is the unseen data.
So we test how well your CNN general license to unseen data.
So similarly, zoom back out we can do accuracy charts in much the same way we just accessed Excel accuracy
values from the history dict dictionary.
We create the same epochs right here.
We just plot these things out and we get accuracy values here.
And you can see that.
Similarly, in the end, accuracy of the validation looks to be above, which is good.
It's a very good sign that our model is performing as we want to do.
So it's above the training accuracy, which is exactly what they just said, and that's a good sign.
So you can see it's nice where we can plot these values.
This is just one of the many ways we can do this.
You can actually do this life during training with something like Tensor Board, but we won't be using
TensorFlow much in this course and some of the object detector lessons.
We will analyze the results with Tensor Board afterward.
But for now, this is the easy and best way to do it and gives you a good understanding of what what's
going on will stop there for now.
And in the last section, we'll take a look at how we save our little models and then how we get some
predictions out of that model.
So I'll see you in the next section then.