Program configurations

Now, let's look at our old program configurations, which are as follows:

    batch_size = 128 
    num_steps = 10000 
    learning_rate = 0.3 
    data_showing_step = 500 

We will need more configurations this time. Here is what we will use now:

 batch_size = 32 
 num_steps = 30000 
 learning_rate = 0.1 
 data_showing_step = 500 
 model_saving_step = 2000 
 log_location = '/tmp/alex_nn_log' 
 
 SEED = 11215 
 
 patch_size = 5 
 depth_inc = 4 
 num_hidden_inc = 32 
 dropout_prob = 0.8 
 conv_layers = 3 
 stddev = 0.1 

The first four configurations are familiar:

  • We will still train for a certain number of steps (num_steps), just as we did earlier. But, you'll notice the number of steps has gone up. They will get even higher because our datasets will be more complex and require more training.
  • We will revisit subtleties around the learning rate (learning_rate) later, but to start with, you are already familiar with it.
  • We will review results intermediately every five hundred steps, which is trivially controlled by the data_showing_step variable.
  • Finally, log_location controls where our TensorBoard logs are dumped. We are quite familiar with this from Chapter 3, The TensorFlow Toolbox. We will use it again in this chapter but without explanations this time.

The next configuration—the random seed (SEED) variable - can be helpful. This can be left unset and TensorFlow will randomize numbers on each run. However, having a seed variable set, and constant across runs, will allow consistency from run to run as we debug our system. If you do use it, which you should do to start off, you can set it to any number you wish: your birthday, anniversary date, first phone number, or lucky number. I use the ZIP code for my beloved neighborhood. Enjoy the small things.

Finally, we will encounter seven new variables—batch_size, patch_size, depth_inc, num_hidden_inc, conv_layers, stddev, and dropout_prob. These are at the heart of how our newer, more advanced Convolutional neural networks (CNNs) works and will be introduced in context as we explore the network we're using.

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

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