Chapter 5. Wrapping Up

In the previous chapter, we learned about another interface to TensorFlow and RNN models. This chapter will wrap up our look at TensorFlow, looking at how far we've come and where you can go from here. First, we'll review our progress on the font classification problem, then we'll briefly look at TensorFlow beyond deep learning and see where it will go in the future. At the end of the chapter, you will be familiar with the following concepts:

  • Research evaluation
  • A quick review of all the models
  • The future of TensorFlow
  • Some more TensorFlow projects

Let's now begin by looking at research evaluation in detail.

Research evaluation

In this section, we'll compare our models in the font classification problem. First, we should remind ourselves what the data looks like. Then, we'll inspect the simple logistic dense neural network and convolutional neural network models. You've come a long way in modeling with TensorFlow.

Before we move on from deep learning, however, let's look back and see how models compare on the font classification problem. First, let's look at the data again, so we don't lose sight of the problem. In fact, let's look at one image that includes all the letters and digits from every font, just to see what shapes we have:

# One look at a letter/digit from each font
# Best to reshape as one large array, then plot
all_letters = np.zeros([5*36,62*36])
for font in range(5):
    for letter in range(62):
        all_letters[font*36:(font+1)*36,
                letter*36:(letter+1)*36] = 
                train[9*(font*62 + letter)]

This would be a lot of subplots for Matplotlib to handle. So, we'll make a new array, 5 images tall, 5 fonts times 36 pixels, and 62 images wide, 62 letters or digits times 36 pixels. After allocating a zero array, we can stack the training images into it. Fonts and letters act as indices and we set 36x36 values at a time in the big array. Note that we have 9 in the train array here, because we're only taking one type of jitter each letter.

Let's take a look with a quick call to pcolormesh:

plt.pcolormesh(all_letters,
        cmap=plt.cm.gray)
Research evaluation

As you can see, we have the entire alphabet, upper and lowercase, as well as digits 0 to 9. Some of the fonts look like others, while font 0 is kind of in its own world, to human eyes anyway. Each font has interesting stylistic properties that we hope our model picks up on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.0.42