From the course: Neural Networks and Convolutional Neural Networks Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Training and evaluating the model

Training and evaluating the model

From the course: Neural Networks and Convolutional Neural Networks Essential Training

Start my 1-month free trial

Training and evaluating the model

- [Instructor] Now if this looks familiar, that's because it is. This is exactly how we implemented the code in the neural networks chapter. When training this model it will take between 15 to 20 minutes per epoch. So you can train the model this way if you want, but I've left the code commented out and I'm going to show you an alternate way of determining the weights. Now Keras allows us to do that very easily, so all we need to do is type the model name, cnn, load weights, and the weights is stored in the folder weights, and it's called cnn-model5.h5. So what we have done here is that we have identical models, but the only difference is that instead of having to wait for this model to train we've been able to use weights that I have trained on the identical model and be able to move ahead with this exercise. So now we can evaluate the accuracy of the model. So type cnn, evaluate, and remember that the two parameters are x test and y test and let's store that in score. Now if you…

Contents