Single hidden layer explained
In this section, we'll carefully look at the model we built. First, we'll verify the overall accuracy of our model, then we'll see where the model goes wrong. Finally, we'll visualize the weights associated with several neurons to see what they're looking for:
plt.figure(figsize=(6, 6)) plt.plot(train_acc,'bo') plt.plot(test_acc,'rx')
Make sure that you've trained your model as we did in the previous section, if not, you might want to stop here and do that first. Because we evaluated our model accuracy every 10 training epochs and saved the result, it's now easy to explore how our model has evolved.
Using Matplotlib, we can plot both the training accuracy (the blue dots) and testing accuracy (the red dots) on the same ...
Get Hands-On Deep Learning with TensorFlow now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.