Fully Connected Naural Networks - Regularization/Dropout - No Convolutions


In [28]:
# These are all the modules we'll be using later. Make sure you can import them
# before proceeding further.
from __future__ import print_function
import numpy as np
import tensorflow as tf
import pandas as pd
from six.moves import cPickle as pickle

First reload the data we generated in notMNIST_nonTensorFlow_comparisons.ipynb.


In [2]:
pickle_file = 'notMNIST.pickle'

with open(pickle_file, 'rb') as f:
  save = pickle.load(f)
  train_dataset = save['train_dataset']
  train_labels = save['train_labels']
  valid_dataset = save['valid_dataset']
  valid_labels = save['valid_labels']
  test_dataset = save['test_dataset']
  test_labels = save['test_labels']
  del save  # hint to help gc free up memory
  print('Training set', train_dataset.shape, train_labels.shape)
  print('Validation set', valid_dataset.shape, valid_labels.shape)
  print('Test set', test_dataset.shape, test_labels.shape)


Training set (200000, 28, 28) (200000,)
Validation set (10000, 28, 28) (10000,)
Test set (10000, 28, 28) (10000,)

Reformat into a shape that's more adapted to the models we're going to train:

  • data as a flat matrix,
  • labels as float 1-hot encodings.

In [3]:
image_size = 28
num_labels = 10

def reformat(dataset, labels):
  dataset = dataset.reshape((-1, image_size * image_size)).astype(np.float32)
  # Map 1 to [0.0, 1.0, 0.0 ...], 2 to [0.0, 0.0, 1.0 ...]
  labels = (np.arange(num_labels) == labels[:,None]).astype(np.float32)
  return dataset, labels
train_dataset, train_labels = reformat(train_dataset, train_labels)
valid_dataset, valid_labels = reformat(valid_dataset, valid_labels)
test_dataset, test_labels = reformat(test_dataset, test_labels)
print('Training set', train_dataset.shape, train_labels.shape)
print('Validation set', valid_dataset.shape, valid_labels.shape)
print('Test set', test_dataset.shape, test_labels.shape)


Training set (200000, 784) (200000, 10)
Validation set (10000, 784) (10000, 10)
Test set (10000, 784) (10000, 10)

In [4]:
def accuracy(predictions, labels):
  return (100.0 * np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1))
          / predictions.shape[0])

Dropout

Let's introduce Dropout on the hidden layers of the neural networks. Remember: Dropout should only be introduced during training, not evaluation, otherwise your evaluation results would be stochastic as well. TensorFlow provides nn.dropout() for that, but we have to make sure it's only inserted during training.

tf.nn.dropout(x, keep_prob, noise_shape=None, seed=None, name=None) {#dropout}

Computes dropout.

With probability keep_prob, outputs the input element scaled up by 1 / keep_prob, otherwise outputs 0. The scaling is so that the expected sum is unchanged.

By default, each element is kept or dropped independently. If noise_shape is specified, it must be broadcastable to the shape of x, and only dimensions with noise_shape[i] == shape(x)[i] will make independent decisions. For example, if shape(x) = [k, l, m, n] and noise_shape = [k, 1, 1, n], each batch and channel component will be kept independently and each row and column will be kept or not kept together.

Args:
  • `x`: A tensor.
  • `keep_prob`: A scalar Tensor with the same type as x. The probability that each element is kept.
  • `noise_shape`: A 1-D Tensor of type int32, representing the shape for randomly generated keep/drop flags.
  • `seed`: A Python integer. Used to create random seeds. See set_random_seed for behavior.
  • `name`: A name for this operation (optional).
Returns:

A Tensor of the same shape of x.

Raises:
  • `ValueError`: If keep_prob is not in (0, 1].

HowTo

We create a placeholder for the probability that a neuron's output is kept during dropout. This allows us to turn dropout on during training, and turn it off during testing. TensorFlow's tf.nn.dropout op automatically handles scaling neuron outputs in addition to masking them, so dropout just works without any additional scaling

Further details: https://www.tensorflow.org/versions/r0.11/tutorials/mnist/pros/

Neural Networks models: 1 hidden layer


In [16]:
import math 

def create_nn1_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         dropout,
                         num_steps,
                         hidden_size = 1024, 
                         num_labels=10,batch_size = 128):
    
    uniMax = 1/math.sqrt(hidden_size)
    
    with graph.as_default():
      # Input data. For the training data, we use a placeholder that will be fed
      # at run time with a training minibatch.
      tf_train_dataset = tf.placeholder(tf.float32,shape=(batch_size, image_size * image_size))
      tf_train_labels = tf.placeholder(tf.float32, shape=(batch_size, num_labels))
        
      tf_valid_dataset = tf.constant(valid_dataset)
      tf_test_dataset = tf.constant(test_dataset)

      # Hidden 1
      weights_1 = tf.Variable(tf.random_uniform([image_size * image_size, hidden_size], minval=-uniMax, maxval=uniMax),
                             name='weights_1')
      biases_1 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_1')
      hidden_1 = tf.nn.relu(tf.matmul(tf_train_dataset, weights_1) + biases_1)
      
      if dropout>0: 
        dropped = tf.nn.dropout(hidden_1, dropout)
      else:
        dropped = hidden_1

      # Softmax 
      weights_2 = tf.Variable(tf.random_uniform([hidden_size, num_labels],minval=-uniMax, maxval=uniMax), name='weights_2')
      biases_2 = tf.Variable(tf.random_uniform([num_labels],minval=-uniMax, maxval=uniMax),name='biases_2')
      logits = tf.matmul(dropped, weights_2) + biases_2

      # 
      loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, tf_train_labels))

      # Optimizer.
      global_step = tf.Variable(0)  # count the number of steps taken.
      learning_rate = tf.train.exponential_decay(0.5, global_step, 100000, 0.96, staircase=True)
      optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(loss, global_step=global_step)
      #optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(loss)


      # Predictions for the training, validation, and test data.
      train_prediction = tf.nn.softmax(logits)
    
      valid_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf_valid_dataset, weights_1) + biases_1), weights_2) + biases_2)
      test_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf_test_dataset, weights_1) + biases_1), weights_2) + biases_2)

    test_accuracy = 0
    with tf.Session(graph=graph) as session:
        tf.global_variables_initializer().run()
        print("Initialized")
        for step in range(num_steps):
            offset = (step * batch_size) % (train_labels.shape[0] - batch_size)
            
            batch_data = train_dataset[offset:(offset + batch_size), :]
            batch_labels = train_labels[offset:(offset + batch_size), :]
           
            feed_dict = {tf_train_dataset : batch_data, tf_train_labels : batch_labels}
            _, l, predictions = session.run([optimizer, loss, train_prediction], feed_dict=feed_dict)
            
            if (step % 500 == 0):
              print("Minibatch loss at step %d: %f" % (step, l))
              print("Minibatch accuracy: %.1f%%" % accuracy(predictions, batch_labels))
              print("Validation accuracy: %.1f%%" % accuracy(
              valid_prediction.eval(), valid_labels))
              test_accuracy = accuracy(test_prediction.eval(), test_labels)
              print("Test accuracy: %.1f%%" % test_accuracy)
    return test_accuracy

In [17]:
num_steps = 3001

keep_probs = [0, 0.3,0.4, 0.5, 0.6,0.7]
test_accuracy = np.zeros(len(keep_probs))
i = 0
for keep_prob in keep_probs:
  print("\n>>>>>>>>>> keep_prob: %f" % keep_prob)
  graph = tf.Graph()
  test_accuracy[i] = create_nn1_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         keep_prob,
                         num_steps)
   
  i = i +1


>>>>>>>>>> keep_prob: 0.000000
Initialized
Minibatch loss at step 0: 2.315333
Minibatch accuracy: 8.6%
Validation accuracy: 34.9%
Test accuracy: 37.2%
Minibatch loss at step 500: 0.357309
Minibatch accuracy: 90.6%
Validation accuracy: 85.5%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.540357
Minibatch accuracy: 85.2%
Validation accuracy: 86.3%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.293043
Minibatch accuracy: 92.2%
Validation accuracy: 87.5%
Test accuracy: 93.9%
Minibatch loss at step 2000: 0.282493
Minibatch accuracy: 93.8%
Validation accuracy: 87.8%
Test accuracy: 94.2%
Minibatch loss at step 2500: 0.339409
Minibatch accuracy: 89.8%
Validation accuracy: 87.9%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.354558
Minibatch accuracy: 89.8%
Validation accuracy: 88.2%
Test accuracy: 94.3%

>>>>>>>>>> keep_prob: 0.300000
Initialized
Minibatch loss at step 0: 2.343650
Minibatch accuracy: 6.2%
Validation accuracy: 37.4%
Test accuracy: 40.7%
Minibatch loss at step 500: 0.604629
Minibatch accuracy: 85.2%
Validation accuracy: 84.1%
Test accuracy: 90.9%
Minibatch loss at step 1000: 0.666325
Minibatch accuracy: 81.2%
Validation accuracy: 84.5%
Test accuracy: 91.5%
Minibatch loss at step 1500: 0.573536
Minibatch accuracy: 85.2%
Validation accuracy: 85.1%
Test accuracy: 92.0%
Minibatch loss at step 2000: 0.414929
Minibatch accuracy: 87.5%
Validation accuracy: 86.0%
Test accuracy: 92.5%
Minibatch loss at step 2500: 0.579069
Minibatch accuracy: 83.6%
Validation accuracy: 85.6%
Test accuracy: 92.4%
Minibatch loss at step 3000: 0.544650
Minibatch accuracy: 83.6%
Validation accuracy: 86.2%
Test accuracy: 92.9%

>>>>>>>>>> keep_prob: 0.400000
Initialized
Minibatch loss at step 0: 2.307111
Minibatch accuracy: 10.9%
Validation accuracy: 33.8%
Test accuracy: 36.1%
Minibatch loss at step 500: 0.491085
Minibatch accuracy: 83.6%
Validation accuracy: 84.5%
Test accuracy: 91.1%
Minibatch loss at step 1000: 0.625153
Minibatch accuracy: 83.6%
Validation accuracy: 85.2%
Test accuracy: 91.9%
Minibatch loss at step 1500: 0.437642
Minibatch accuracy: 89.1%
Validation accuracy: 86.0%
Test accuracy: 92.5%
Minibatch loss at step 2000: 0.382675
Minibatch accuracy: 91.4%
Validation accuracy: 86.1%
Test accuracy: 92.9%
Minibatch loss at step 2500: 0.475697
Minibatch accuracy: 84.4%
Validation accuracy: 86.7%
Test accuracy: 93.1%
Minibatch loss at step 3000: 0.499541
Minibatch accuracy: 87.5%
Validation accuracy: 86.8%
Test accuracy: 93.1%

>>>>>>>>>> keep_prob: 0.500000
Initialized
Minibatch loss at step 0: 2.306122
Minibatch accuracy: 8.6%
Validation accuracy: 31.4%
Test accuracy: 33.8%
Minibatch loss at step 500: 0.426311
Minibatch accuracy: 89.8%
Validation accuracy: 84.6%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.588321
Minibatch accuracy: 82.0%
Validation accuracy: 85.6%
Test accuracy: 92.2%
Minibatch loss at step 1500: 0.344181
Minibatch accuracy: 90.6%
Validation accuracy: 86.9%
Test accuracy: 93.2%
Minibatch loss at step 2000: 0.301023
Minibatch accuracy: 92.2%
Validation accuracy: 86.7%
Test accuracy: 93.4%
Minibatch loss at step 2500: 0.438312
Minibatch accuracy: 87.5%
Validation accuracy: 87.0%
Test accuracy: 93.6%
Minibatch loss at step 3000: 0.448816
Minibatch accuracy: 84.4%
Validation accuracy: 87.1%
Test accuracy: 93.4%

>>>>>>>>>> keep_prob: 0.600000
Initialized
Minibatch loss at step 0: 2.297631
Minibatch accuracy: 11.7%
Validation accuracy: 42.3%
Test accuracy: 46.2%
Minibatch loss at step 500: 0.388815
Minibatch accuracy: 90.6%
Validation accuracy: 84.9%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.584715
Minibatch accuracy: 85.9%
Validation accuracy: 85.6%
Test accuracy: 92.3%
Minibatch loss at step 1500: 0.376472
Minibatch accuracy: 90.6%
Validation accuracy: 86.8%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.322120
Minibatch accuracy: 90.6%
Validation accuracy: 87.2%
Test accuracy: 93.4%
Minibatch loss at step 2500: 0.362604
Minibatch accuracy: 89.8%
Validation accuracy: 87.1%
Test accuracy: 93.5%
Minibatch loss at step 3000: 0.450495
Minibatch accuracy: 86.7%
Validation accuracy: 87.7%
Test accuracy: 93.9%

>>>>>>>>>> keep_prob: 0.700000
Initialized
Minibatch loss at step 0: 2.307561
Minibatch accuracy: 10.9%
Validation accuracy: 35.5%
Test accuracy: 38.6%
Minibatch loss at step 500: 0.406717
Minibatch accuracy: 89.1%
Validation accuracy: 85.1%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.576053
Minibatch accuracy: 82.0%
Validation accuracy: 85.9%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.302879
Minibatch accuracy: 91.4%
Validation accuracy: 87.2%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.295290
Minibatch accuracy: 93.0%
Validation accuracy: 87.3%
Test accuracy: 93.7%
Minibatch loss at step 2500: 0.381301
Minibatch accuracy: 88.3%
Validation accuracy: 87.7%
Test accuracy: 94.0%
Minibatch loss at step 3000: 0.405640
Minibatch accuracy: 86.7%
Validation accuracy: 87.7%
Test accuracy: 94.0%

In [19]:
print("*** Best keep_prob:"+str(keep_probs[np.argmax(test_accuracy)])+ " -- accuracy:" + str(test_accuracy[np.argmax(test_accuracy)]))


*** Best keep_prob:0 -- accuracy:94.26

We did not get an improvement in test accuracy by using dropout as the best accuracy occours for keep_prob=0 that means no dropout.

Neural Networks models: 2 hidden layers


In [66]:
def create_nn2_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         dropout_vect,
                         num_steps,
                         hidden_size = 1024, 
                         num_labels=10,batch_size = 128):
    
    assert dropout_vect.shape == (2,)
    
    uniMax = 1/math.sqrt(hidden_size)
    
    with graph.as_default():
      # Input data. For the training data, we use a placeholder that will be fed
      # at run time with a training minibatch.
      tf_train_dataset = tf.placeholder(tf.float32,shape=(batch_size, image_size * image_size))
      tf_train_labels = tf.placeholder(tf.float32, shape=(batch_size, num_labels))
        
      tf_valid_dataset = tf.constant(valid_dataset)
      tf_test_dataset = tf.constant(test_dataset)

      # Hidden 1
      weights_1 = tf.Variable(tf.random_uniform([image_size * image_size, hidden_size], minval=-uniMax, maxval=uniMax),
                             name='weights_1')
      biases_1 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_1')
      hidden_1 = tf.nn.relu(tf.matmul(tf_train_dataset, weights_1) + biases_1)
      
      if dropout_vect[0]>0: 
        dropped_1 = tf.nn.dropout(hidden_1, dropout_vect[0])
      else:
        dropped_1 = hidden_1
    
      # Hidden 2
      weights_2 = tf.Variable(tf.random_uniform([hidden_size, hidden_size], minval=-uniMax, maxval=uniMax),name='weights_2')
      biases_2 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_2')
      hidden_2 = tf.nn.relu(tf.matmul(dropped_1, weights_2) + biases_2)
    
      if dropout_vect[1]>0: 
        dropped_2 = tf.nn.dropout(hidden_2, dropout_vect[1])
      else:
        dropped_2 = hidden_2
        
      # Softmax 
      weights_3 = tf.Variable(tf.random_uniform([hidden_size, num_labels],minval=-uniMax, maxval=uniMax), name='weights_3')
      biases_3 = tf.Variable(tf.random_uniform([num_labels],minval=-uniMax, maxval=uniMax),name='biases_3')
      logits = tf.matmul(dropped_2, weights_3) + biases_3

      # 
      loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, tf_train_labels))

      # Optimizer.
      global_step = tf.Variable(0)  # count the number of steps taken.
      learning_rate = tf.train.exponential_decay(0.5, global_step, 100000, 0.96, staircase=True)
      optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(loss, global_step=global_step)
      #optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(loss)


      # Predictions for the training, validation, and test data.
      train_prediction = tf.nn.softmax(logits)
    
      valid_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf_valid_dataset, weights_1) + biases_1), weights_2) + biases_2),
                  weights_3) + biases_3)
      test_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf_test_dataset, weights_1) + biases_1), weights_2) + biases_2), 
                   weights_3) + biases_3)

    test_accuracy = 0
    with tf.Session(graph=graph) as session:
        tf.global_variables_initializer().run()
        print("Initialized")
        for step in range(num_steps):
            offset = (step * batch_size) % (train_labels.shape[0] - batch_size)
            
            batch_data = train_dataset[offset:(offset + batch_size), :]
            batch_labels = train_labels[offset:(offset + batch_size), :]
           
            feed_dict = {tf_train_dataset : batch_data, tf_train_labels : batch_labels}
            _, l, predictions = session.run([optimizer, loss, train_prediction], feed_dict=feed_dict)
            
            if (step % 500 == 0):
              print("Minibatch loss at step %d: %f" % (step, l))
              print("Minibatch accuracy: %.1f%%" % accuracy(predictions, batch_labels))
              print("Validation accuracy: %.1f%%" % accuracy(
              valid_prediction.eval(), valid_labels))
              test_accuracy = accuracy(test_prediction.eval(), test_labels)
              print("Test accuracy: %.1f%%" % test_accuracy)
    return test_accuracy

In [67]:
keep_probs = [0, 0.3,0.4, 0.5, 0.6,0.7]
tuneGrid = pd.DataFrame.from_records([(kp1,kp2,0) for kp1 in keep_probs for kp2 in keep_probs],
                          columns=['drop_1','drop_2','test_accuracy'])
#tuneGrid.head()
for i in range(0,tuneGrid.shape[0]):
  drop_1 , drop_2 = tuneGrid.iloc[i,0] , tuneGrid.iloc[i,1]
  print("\n>>>>>>>>>> keep_prob_1: %f ---- keep_prob_2: %f" % (drop_1 , drop_2))
  graph = tf.Graph()
  tuneGrid.iloc[i,2] = create_nn2_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         np.array([drop_1,drop_2]),
                         num_steps)


>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.312819
Minibatch accuracy: 6.2%
Validation accuracy: 31.7%
Test accuracy: 34.7%
Minibatch loss at step 500: 0.345798
Minibatch accuracy: 89.1%
Validation accuracy: 85.5%
Test accuracy: 92.2%
Minibatch loss at step 1000: 0.479616
Minibatch accuracy: 85.2%
Validation accuracy: 86.7%
Test accuracy: 93.1%
Minibatch loss at step 1500: 0.254761
Minibatch accuracy: 90.6%
Validation accuracy: 88.2%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.240032
Minibatch accuracy: 93.8%
Validation accuracy: 88.3%
Test accuracy: 94.7%
Minibatch loss at step 2500: 0.304383
Minibatch accuracy: 90.6%
Validation accuracy: 89.0%
Test accuracy: 95.0%
Minibatch loss at step 3000: 0.336706
Minibatch accuracy: 88.3%
Validation accuracy: 89.1%
Test accuracy: 94.9%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.302322
Minibatch accuracy: 6.2%
Validation accuracy: 29.5%
Test accuracy: 31.3%
Minibatch loss at step 500: 0.378720
Minibatch accuracy: 89.8%
Validation accuracy: 85.2%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.516540
Minibatch accuracy: 85.2%
Validation accuracy: 86.5%
Test accuracy: 93.0%
Minibatch loss at step 1500: 0.304261
Minibatch accuracy: 90.6%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.286544
Minibatch accuracy: 91.4%
Validation accuracy: 88.0%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.359491
Minibatch accuracy: 90.6%
Validation accuracy: 88.3%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.367913
Minibatch accuracy: 89.8%
Validation accuracy: 88.6%
Test accuracy: 94.5%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.304077
Minibatch accuracy: 11.7%
Validation accuracy: 27.0%
Test accuracy: 29.7%
Minibatch loss at step 500: 0.358256
Minibatch accuracy: 90.6%
Validation accuracy: 85.3%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.519137
Minibatch accuracy: 86.7%
Validation accuracy: 86.4%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.296490
Minibatch accuracy: 90.6%
Validation accuracy: 87.7%
Test accuracy: 93.6%
Minibatch loss at step 2000: 0.279853
Minibatch accuracy: 90.6%
Validation accuracy: 88.1%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.342422
Minibatch accuracy: 89.1%
Validation accuracy: 88.3%
Test accuracy: 94.4%
Minibatch loss at step 3000: 0.390573
Minibatch accuracy: 87.5%
Validation accuracy: 88.3%
Test accuracy: 94.4%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.301950
Minibatch accuracy: 14.1%
Validation accuracy: 26.3%
Test accuracy: 28.6%
Minibatch loss at step 500: 0.366997
Minibatch accuracy: 89.8%
Validation accuracy: 85.4%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.503119
Minibatch accuracy: 84.4%
Validation accuracy: 86.4%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.250260
Minibatch accuracy: 93.0%
Validation accuracy: 88.0%
Test accuracy: 94.1%
Minibatch loss at step 2000: 0.285485
Minibatch accuracy: 94.5%
Validation accuracy: 88.3%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.291745
Minibatch accuracy: 91.4%
Validation accuracy: 88.6%
Test accuracy: 94.8%
Minibatch loss at step 3000: 0.337206
Minibatch accuracy: 89.1%
Validation accuracy: 89.0%
Test accuracy: 94.9%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.318914
Minibatch accuracy: 9.4%
Validation accuracy: 23.8%
Test accuracy: 25.1%
Minibatch loss at step 500: 0.367812
Minibatch accuracy: 89.1%
Validation accuracy: 85.6%
Test accuracy: 92.1%
Minibatch loss at step 1000: 0.447942
Minibatch accuracy: 85.9%
Validation accuracy: 86.4%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.279314
Minibatch accuracy: 91.4%
Validation accuracy: 87.8%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.279991
Minibatch accuracy: 93.0%
Validation accuracy: 88.3%
Test accuracy: 94.7%
Minibatch loss at step 2500: 0.317560
Minibatch accuracy: 90.6%
Validation accuracy: 88.5%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.333775
Minibatch accuracy: 89.8%
Validation accuracy: 88.7%
Test accuracy: 94.6%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.306290
Minibatch accuracy: 9.4%
Validation accuracy: 22.5%
Test accuracy: 23.8%
Minibatch loss at step 500: 0.362070
Minibatch accuracy: 88.3%
Validation accuracy: 85.6%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.471089
Minibatch accuracy: 84.4%
Validation accuracy: 86.5%
Test accuracy: 93.0%
Minibatch loss at step 1500: 0.245662
Minibatch accuracy: 92.2%
Validation accuracy: 88.1%
Test accuracy: 94.1%
Minibatch loss at step 2000: 0.264737
Minibatch accuracy: 94.5%
Validation accuracy: 88.3%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.337165
Minibatch accuracy: 89.1%
Validation accuracy: 88.8%
Test accuracy: 94.9%
Minibatch loss at step 3000: 0.360916
Minibatch accuracy: 88.3%
Validation accuracy: 88.9%
Test accuracy: 94.8%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.307198
Minibatch accuracy: 9.4%
Validation accuracy: 23.6%
Test accuracy: 25.4%
Minibatch loss at step 500: 0.384082
Minibatch accuracy: 88.3%
Validation accuracy: 84.4%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.487637
Minibatch accuracy: 83.6%
Validation accuracy: 85.2%
Test accuracy: 91.7%
Minibatch loss at step 1500: 0.390197
Minibatch accuracy: 87.5%
Validation accuracy: 86.5%
Test accuracy: 92.8%
Minibatch loss at step 2000: 0.358455
Minibatch accuracy: 89.1%
Validation accuracy: 87.1%
Test accuracy: 93.2%
Minibatch loss at step 2500: 0.422655
Minibatch accuracy: 86.7%
Validation accuracy: 87.2%
Test accuracy: 93.3%
Minibatch loss at step 3000: 0.428847
Minibatch accuracy: 85.9%
Validation accuracy: 87.2%
Test accuracy: 93.5%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.311280
Minibatch accuracy: 10.9%
Validation accuracy: 26.9%
Test accuracy: 29.2%
Minibatch loss at step 500: 0.535063
Minibatch accuracy: 85.2%
Validation accuracy: 83.9%
Test accuracy: 91.0%
Minibatch loss at step 1000: 0.549111
Minibatch accuracy: 85.2%
Validation accuracy: 84.4%
Test accuracy: 91.1%
Minibatch loss at step 1500: 0.491555
Minibatch accuracy: 85.2%
Validation accuracy: 84.7%
Test accuracy: 91.6%
Minibatch loss at step 2000: 0.489481
Minibatch accuracy: 85.2%
Validation accuracy: 85.5%
Test accuracy: 92.0%
Minibatch loss at step 2500: 0.570864
Minibatch accuracy: 78.9%
Validation accuracy: 84.8%
Test accuracy: 91.7%
Minibatch loss at step 3000: 0.573710
Minibatch accuracy: 80.5%
Validation accuracy: 84.4%
Test accuracy: 91.3%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.304840
Minibatch accuracy: 9.4%
Validation accuracy: 23.2%
Test accuracy: 24.9%
Minibatch loss at step 500: 0.543830
Minibatch accuracy: 85.2%
Validation accuracy: 84.2%
Test accuracy: 90.9%
Minibatch loss at step 1000: 0.575046
Minibatch accuracy: 79.7%
Validation accuracy: 84.4%
Test accuracy: 91.4%
Minibatch loss at step 1500: 0.327899
Minibatch accuracy: 89.8%
Validation accuracy: 85.2%
Test accuracy: 92.0%
Minibatch loss at step 2000: 0.366576
Minibatch accuracy: 88.3%
Validation accuracy: 85.8%
Test accuracy: 92.6%
Minibatch loss at step 2500: 0.536712
Minibatch accuracy: 85.9%
Validation accuracy: 85.3%
Test accuracy: 92.1%
Minibatch loss at step 3000: 0.489918
Minibatch accuracy: 85.2%
Validation accuracy: 85.9%
Test accuracy: 92.3%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.306956
Minibatch accuracy: 8.6%
Validation accuracy: 27.7%
Test accuracy: 30.4%
Minibatch loss at step 500: 0.425345
Minibatch accuracy: 86.7%
Validation accuracy: 84.2%
Test accuracy: 91.0%
Minibatch loss at step 1000: 0.524861
Minibatch accuracy: 85.2%
Validation accuracy: 84.9%
Test accuracy: 91.6%
Minibatch loss at step 1500: 0.370717
Minibatch accuracy: 88.3%
Validation accuracy: 85.6%
Test accuracy: 92.3%
Minibatch loss at step 2000: 0.428580
Minibatch accuracy: 91.4%
Validation accuracy: 86.2%
Test accuracy: 92.3%
Minibatch loss at step 2500: 0.503021
Minibatch accuracy: 81.2%
Validation accuracy: 86.1%
Test accuracy: 92.6%
Minibatch loss at step 3000: 0.516686
Minibatch accuracy: 83.6%
Validation accuracy: 86.5%
Test accuracy: 92.6%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.301484
Minibatch accuracy: 8.6%
Validation accuracy: 26.7%
Test accuracy: 29.5%
Minibatch loss at step 500: 0.436436
Minibatch accuracy: 88.3%
Validation accuracy: 84.0%
Test accuracy: 90.8%
Minibatch loss at step 1000: 0.572845
Minibatch accuracy: 81.2%
Validation accuracy: 85.2%
Test accuracy: 91.7%
Minibatch loss at step 1500: 0.398544
Minibatch accuracy: 86.7%
Validation accuracy: 85.8%
Test accuracy: 92.4%
Minibatch loss at step 2000: 0.363430
Minibatch accuracy: 92.2%
Validation accuracy: 86.8%
Test accuracy: 93.1%
Minibatch loss at step 2500: 0.424378
Minibatch accuracy: 87.5%
Validation accuracy: 86.3%
Test accuracy: 92.9%
Minibatch loss at step 3000: 0.473221
Minibatch accuracy: 82.0%
Validation accuracy: 86.4%
Test accuracy: 93.1%

>>>>>>>>>> keep_prob_1: 0.300000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.309660
Minibatch accuracy: 10.2%
Validation accuracy: 21.8%
Test accuracy: 23.0%
Minibatch loss at step 500: 0.438078
Minibatch accuracy: 87.5%
Validation accuracy: 84.6%
Test accuracy: 91.3%
Minibatch loss at step 1000: 0.591365
Minibatch accuracy: 82.0%
Validation accuracy: 85.5%
Test accuracy: 92.0%
Minibatch loss at step 1500: 0.376220
Minibatch accuracy: 89.8%
Validation accuracy: 85.8%
Test accuracy: 92.4%
Minibatch loss at step 2000: 0.384728
Minibatch accuracy: 88.3%
Validation accuracy: 86.6%
Test accuracy: 93.0%
Minibatch loss at step 2500: 0.441625
Minibatch accuracy: 85.9%
Validation accuracy: 86.6%
Test accuracy: 93.0%
Minibatch loss at step 3000: 0.538459
Minibatch accuracy: 83.6%
Validation accuracy: 87.1%
Test accuracy: 93.6%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.302361
Minibatch accuracy: 10.9%
Validation accuracy: 26.0%
Test accuracy: 27.7%
Minibatch loss at step 500: 0.376824
Minibatch accuracy: 89.1%
Validation accuracy: 84.6%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.549820
Minibatch accuracy: 85.2%
Validation accuracy: 85.8%
Test accuracy: 92.3%
Minibatch loss at step 1500: 0.339193
Minibatch accuracy: 91.4%
Validation accuracy: 87.0%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.311582
Minibatch accuracy: 91.4%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 2500: 0.328342
Minibatch accuracy: 89.8%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 3000: 0.380871
Minibatch accuracy: 89.1%
Validation accuracy: 88.0%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.302405
Minibatch accuracy: 10.2%
Validation accuracy: 31.1%
Test accuracy: 33.6%
Minibatch loss at step 500: 0.423732
Minibatch accuracy: 86.7%
Validation accuracy: 84.0%
Test accuracy: 91.0%
Minibatch loss at step 1000: 0.543302
Minibatch accuracy: 83.6%
Validation accuracy: 85.1%
Test accuracy: 91.5%
Minibatch loss at step 1500: 0.374391
Minibatch accuracy: 85.2%
Validation accuracy: 85.4%
Test accuracy: 92.3%
Minibatch loss at step 2000: 0.428294
Minibatch accuracy: 88.3%
Validation accuracy: 85.8%
Test accuracy: 92.5%
Minibatch loss at step 2500: 0.490175
Minibatch accuracy: 83.6%
Validation accuracy: 86.4%
Test accuracy: 92.8%
Minibatch loss at step 3000: 0.585947
Minibatch accuracy: 83.6%
Validation accuracy: 86.5%
Test accuracy: 93.1%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.300798
Minibatch accuracy: 10.9%
Validation accuracy: 29.1%
Test accuracy: 31.5%
Minibatch loss at step 500: 0.466761
Minibatch accuracy: 85.9%
Validation accuracy: 84.2%
Test accuracy: 90.8%
Minibatch loss at step 1000: 0.525850
Minibatch accuracy: 83.6%
Validation accuracy: 85.2%
Test accuracy: 92.2%
Minibatch loss at step 1500: 0.377831
Minibatch accuracy: 86.7%
Validation accuracy: 85.8%
Test accuracy: 92.5%
Minibatch loss at step 2000: 0.349200
Minibatch accuracy: 91.4%
Validation accuracy: 86.5%
Test accuracy: 92.9%
Minibatch loss at step 2500: 0.495235
Minibatch accuracy: 85.2%
Validation accuracy: 86.6%
Test accuracy: 93.1%
Minibatch loss at step 3000: 0.400799
Minibatch accuracy: 87.5%
Validation accuracy: 87.0%
Test accuracy: 93.3%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.303798
Minibatch accuracy: 7.0%
Validation accuracy: 28.0%
Test accuracy: 30.4%
Minibatch loss at step 500: 0.393974
Minibatch accuracy: 88.3%
Validation accuracy: 84.5%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.572173
Minibatch accuracy: 84.4%
Validation accuracy: 85.3%
Test accuracy: 92.0%
Minibatch loss at step 1500: 0.351883
Minibatch accuracy: 88.3%
Validation accuracy: 86.6%
Test accuracy: 92.8%
Minibatch loss at step 2000: 0.383998
Minibatch accuracy: 89.1%
Validation accuracy: 87.1%
Test accuracy: 93.3%
Minibatch loss at step 2500: 0.438800
Minibatch accuracy: 85.2%
Validation accuracy: 87.1%
Test accuracy: 93.4%
Minibatch loss at step 3000: 0.462192
Minibatch accuracy: 85.2%
Validation accuracy: 87.0%
Test accuracy: 93.7%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.305330
Minibatch accuracy: 7.0%
Validation accuracy: 22.2%
Test accuracy: 23.7%
Minibatch loss at step 500: 0.418750
Minibatch accuracy: 85.9%
Validation accuracy: 84.4%
Test accuracy: 91.0%
Minibatch loss at step 1000: 0.497058
Minibatch accuracy: 85.9%
Validation accuracy: 86.0%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.415109
Minibatch accuracy: 84.4%
Validation accuracy: 86.4%
Test accuracy: 92.8%
Minibatch loss at step 2000: 0.340132
Minibatch accuracy: 89.1%
Validation accuracy: 87.4%
Test accuracy: 93.2%
Minibatch loss at step 2500: 0.407618
Minibatch accuracy: 85.9%
Validation accuracy: 87.2%
Test accuracy: 93.7%
Minibatch loss at step 3000: 0.394148
Minibatch accuracy: 85.9%
Validation accuracy: 87.6%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.400000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.311179
Minibatch accuracy: 8.6%
Validation accuracy: 23.8%
Test accuracy: 25.6%
Minibatch loss at step 500: 0.404915
Minibatch accuracy: 88.3%
Validation accuracy: 84.7%
Test accuracy: 91.3%
Minibatch loss at step 1000: 0.539390
Minibatch accuracy: 84.4%
Validation accuracy: 85.5%
Test accuracy: 92.2%
Minibatch loss at step 1500: 0.304786
Minibatch accuracy: 89.1%
Validation accuracy: 86.8%
Test accuracy: 92.8%
Minibatch loss at step 2000: 0.316593
Minibatch accuracy: 93.8%
Validation accuracy: 87.2%
Test accuracy: 93.5%
Minibatch loss at step 2500: 0.447398
Minibatch accuracy: 85.9%
Validation accuracy: 87.6%
Test accuracy: 93.9%
Minibatch loss at step 3000: 0.429851
Minibatch accuracy: 87.5%
Validation accuracy: 87.7%
Test accuracy: 93.9%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.299692
Minibatch accuracy: 12.5%
Validation accuracy: 29.9%
Test accuracy: 32.8%
Minibatch loss at step 500: 0.382231
Minibatch accuracy: 89.1%
Validation accuracy: 85.0%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.508502
Minibatch accuracy: 84.4%
Validation accuracy: 86.1%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.306787
Minibatch accuracy: 89.8%
Validation accuracy: 87.3%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.293385
Minibatch accuracy: 92.2%
Validation accuracy: 87.8%
Test accuracy: 94.0%
Minibatch loss at step 2500: 0.354161
Minibatch accuracy: 89.1%
Validation accuracy: 88.0%
Test accuracy: 94.3%
Minibatch loss at step 3000: 0.350178
Minibatch accuracy: 85.9%
Validation accuracy: 88.4%
Test accuracy: 94.2%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.316245
Minibatch accuracy: 12.5%
Validation accuracy: 24.3%
Test accuracy: 26.0%
Minibatch loss at step 500: 0.393601
Minibatch accuracy: 89.1%
Validation accuracy: 84.6%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.543048
Minibatch accuracy: 82.8%
Validation accuracy: 85.1%
Test accuracy: 92.0%
Minibatch loss at step 1500: 0.421762
Minibatch accuracy: 87.5%
Validation accuracy: 86.5%
Test accuracy: 92.8%
Minibatch loss at step 2000: 0.356433
Minibatch accuracy: 91.4%
Validation accuracy: 87.1%
Test accuracy: 93.2%
Minibatch loss at step 2500: 0.410873
Minibatch accuracy: 86.7%
Validation accuracy: 87.1%
Test accuracy: 93.6%
Minibatch loss at step 3000: 0.471209
Minibatch accuracy: 85.2%
Validation accuracy: 87.2%
Test accuracy: 93.9%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.318307
Minibatch accuracy: 11.7%
Validation accuracy: 21.0%
Test accuracy: 22.8%
Minibatch loss at step 500: 0.459876
Minibatch accuracy: 86.7%
Validation accuracy: 84.9%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.506593
Minibatch accuracy: 85.9%
Validation accuracy: 85.9%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.365140
Minibatch accuracy: 89.8%
Validation accuracy: 86.5%
Test accuracy: 93.1%
Minibatch loss at step 2000: 0.384981
Minibatch accuracy: 90.6%
Validation accuracy: 87.1%
Test accuracy: 93.6%
Minibatch loss at step 2500: 0.422370
Minibatch accuracy: 86.7%
Validation accuracy: 87.2%
Test accuracy: 93.6%
Minibatch loss at step 3000: 0.466412
Minibatch accuracy: 88.3%
Validation accuracy: 87.3%
Test accuracy: 93.8%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.307533
Minibatch accuracy: 8.6%
Validation accuracy: 27.7%
Test accuracy: 30.1%
Minibatch loss at step 500: 0.375453
Minibatch accuracy: 89.8%
Validation accuracy: 84.8%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.540217
Minibatch accuracy: 84.4%
Validation accuracy: 85.9%
Test accuracy: 92.3%
Minibatch loss at step 1500: 0.313055
Minibatch accuracy: 89.1%
Validation accuracy: 87.2%
Test accuracy: 93.2%
Minibatch loss at step 2000: 0.316140
Minibatch accuracy: 90.6%
Validation accuracy: 87.5%
Test accuracy: 93.7%
Minibatch loss at step 2500: 0.447453
Minibatch accuracy: 85.2%
Validation accuracy: 87.4%
Test accuracy: 93.9%
Minibatch loss at step 3000: 0.457087
Minibatch accuracy: 85.9%
Validation accuracy: 87.7%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.305768
Minibatch accuracy: 10.2%
Validation accuracy: 30.1%
Test accuracy: 32.3%
Minibatch loss at step 500: 0.383036
Minibatch accuracy: 88.3%
Validation accuracy: 84.8%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.528850
Minibatch accuracy: 82.8%
Validation accuracy: 85.7%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.310639
Minibatch accuracy: 89.1%
Validation accuracy: 86.8%
Test accuracy: 93.2%
Minibatch loss at step 2000: 0.383705
Minibatch accuracy: 91.4%
Validation accuracy: 87.5%
Test accuracy: 93.9%
Minibatch loss at step 2500: 0.381069
Minibatch accuracy: 85.9%
Validation accuracy: 87.6%
Test accuracy: 94.1%
Minibatch loss at step 3000: 0.430799
Minibatch accuracy: 85.2%
Validation accuracy: 87.9%
Test accuracy: 94.1%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.302504
Minibatch accuracy: 9.4%
Validation accuracy: 32.7%
Test accuracy: 35.2%
Minibatch loss at step 500: 0.385088
Minibatch accuracy: 89.1%
Validation accuracy: 84.6%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.530155
Minibatch accuracy: 83.6%
Validation accuracy: 85.8%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.346937
Minibatch accuracy: 89.1%
Validation accuracy: 87.2%
Test accuracy: 93.6%
Minibatch loss at step 2000: 0.339490
Minibatch accuracy: 93.0%
Validation accuracy: 87.8%
Test accuracy: 93.9%
Minibatch loss at step 2500: 0.393039
Minibatch accuracy: 86.7%
Validation accuracy: 87.7%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.418039
Minibatch accuracy: 84.4%
Validation accuracy: 87.9%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.296850
Minibatch accuracy: 14.1%
Validation accuracy: 24.6%
Test accuracy: 26.6%
Minibatch loss at step 500: 0.386038
Minibatch accuracy: 89.1%
Validation accuracy: 85.2%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.502917
Minibatch accuracy: 83.6%
Validation accuracy: 86.4%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.324637
Minibatch accuracy: 89.8%
Validation accuracy: 87.8%
Test accuracy: 93.9%
Minibatch loss at step 2000: 0.268546
Minibatch accuracy: 93.0%
Validation accuracy: 88.2%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.345013
Minibatch accuracy: 86.7%
Validation accuracy: 88.5%
Test accuracy: 94.3%
Minibatch loss at step 3000: 0.405728
Minibatch accuracy: 87.5%
Validation accuracy: 88.8%
Test accuracy: 94.5%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.300595
Minibatch accuracy: 17.2%
Validation accuracy: 21.3%
Test accuracy: 22.8%
Minibatch loss at step 500: 0.398258
Minibatch accuracy: 90.6%
Validation accuracy: 84.7%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.610905
Minibatch accuracy: 85.2%
Validation accuracy: 85.8%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.386745
Minibatch accuracy: 87.5%
Validation accuracy: 86.4%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.380037
Minibatch accuracy: 91.4%
Validation accuracy: 87.0%
Test accuracy: 93.6%
Minibatch loss at step 2500: 0.433070
Minibatch accuracy: 86.7%
Validation accuracy: 87.1%
Test accuracy: 93.6%
Minibatch loss at step 3000: 0.408122
Minibatch accuracy: 88.3%
Validation accuracy: 87.7%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.311615
Minibatch accuracy: 7.0%
Validation accuracy: 27.3%
Test accuracy: 29.2%
Minibatch loss at step 500: 0.375472
Minibatch accuracy: 88.3%
Validation accuracy: 84.8%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.514217
Minibatch accuracy: 84.4%
Validation accuracy: 85.9%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.340251
Minibatch accuracy: 89.1%
Validation accuracy: 86.9%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.318757
Minibatch accuracy: 92.2%
Validation accuracy: 87.8%
Test accuracy: 94.1%
Minibatch loss at step 2500: 0.389655
Minibatch accuracy: 88.3%
Validation accuracy: 87.8%
Test accuracy: 94.1%
Minibatch loss at step 3000: 0.467191
Minibatch accuracy: 85.2%
Validation accuracy: 88.0%
Test accuracy: 94.1%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.302598
Minibatch accuracy: 9.4%
Validation accuracy: 25.7%
Test accuracy: 28.1%
Minibatch loss at step 500: 0.409086
Minibatch accuracy: 87.5%
Validation accuracy: 85.0%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.523167
Minibatch accuracy: 82.8%
Validation accuracy: 86.0%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.297816
Minibatch accuracy: 89.1%
Validation accuracy: 87.4%
Test accuracy: 93.4%
Minibatch loss at step 2000: 0.288496
Minibatch accuracy: 92.2%
Validation accuracy: 87.5%
Test accuracy: 93.8%
Minibatch loss at step 2500: 0.412747
Minibatch accuracy: 87.5%
Validation accuracy: 87.8%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.436366
Minibatch accuracy: 85.9%
Validation accuracy: 88.1%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.316197
Minibatch accuracy: 4.7%
Validation accuracy: 21.5%
Test accuracy: 23.5%
Minibatch loss at step 500: 0.365394
Minibatch accuracy: 89.1%
Validation accuracy: 85.2%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.518629
Minibatch accuracy: 85.2%
Validation accuracy: 86.5%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.318043
Minibatch accuracy: 89.8%
Validation accuracy: 87.5%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.243504
Minibatch accuracy: 94.5%
Validation accuracy: 87.5%
Test accuracy: 93.8%
Minibatch loss at step 2500: 0.379720
Minibatch accuracy: 89.1%
Validation accuracy: 87.9%
Test accuracy: 94.0%
Minibatch loss at step 3000: 0.405921
Minibatch accuracy: 87.5%
Validation accuracy: 88.3%
Test accuracy: 94.5%

>>>>>>>>>> keep_prob_1: 0.600000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.304832
Minibatch accuracy: 10.9%
Validation accuracy: 30.7%
Test accuracy: 33.2%
Minibatch loss at step 500: 0.370786
Minibatch accuracy: 88.3%
Validation accuracy: 85.0%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.509135
Minibatch accuracy: 84.4%
Validation accuracy: 86.1%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.307551
Minibatch accuracy: 91.4%
Validation accuracy: 87.7%
Test accuracy: 93.6%
Minibatch loss at step 2000: 0.324136
Minibatch accuracy: 91.4%
Validation accuracy: 87.5%
Test accuracy: 94.0%
Minibatch loss at step 2500: 0.351934
Minibatch accuracy: 89.1%
Validation accuracy: 87.9%
Test accuracy: 94.1%
Minibatch loss at step 3000: 0.374302
Minibatch accuracy: 88.3%
Validation accuracy: 88.6%
Test accuracy: 94.4%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.000000
Initialized
Minibatch loss at step 0: 2.304414
Minibatch accuracy: 10.2%
Validation accuracy: 30.1%
Test accuracy: 33.0%
Minibatch loss at step 500: 0.355382
Minibatch accuracy: 89.8%
Validation accuracy: 85.5%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.494770
Minibatch accuracy: 85.9%
Validation accuracy: 86.5%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.274908
Minibatch accuracy: 91.4%
Validation accuracy: 88.1%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.268147
Minibatch accuracy: 93.8%
Validation accuracy: 88.3%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.310763
Minibatch accuracy: 89.8%
Validation accuracy: 88.7%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.385103
Minibatch accuracy: 89.1%
Validation accuracy: 88.9%
Test accuracy: 94.6%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.300000
Initialized
Minibatch loss at step 0: 2.289691
Minibatch accuracy: 17.2%
Validation accuracy: 25.9%
Test accuracy: 27.2%
Minibatch loss at step 500: 0.401749
Minibatch accuracy: 88.3%
Validation accuracy: 84.9%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.573927
Minibatch accuracy: 81.2%
Validation accuracy: 85.7%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.341869
Minibatch accuracy: 89.8%
Validation accuracy: 87.0%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.289847
Minibatch accuracy: 92.2%
Validation accuracy: 87.1%
Test accuracy: 93.5%
Minibatch loss at step 2500: 0.416330
Minibatch accuracy: 84.4%
Validation accuracy: 87.5%
Test accuracy: 93.9%
Minibatch loss at step 3000: 0.373237
Minibatch accuracy: 89.1%
Validation accuracy: 87.3%
Test accuracy: 93.6%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.400000
Initialized
Minibatch loss at step 0: 2.308874
Minibatch accuracy: 8.6%
Validation accuracy: 20.6%
Test accuracy: 22.3%
Minibatch loss at step 500: 0.416551
Minibatch accuracy: 87.5%
Validation accuracy: 84.8%
Test accuracy: 91.4%
Minibatch loss at step 1000: 0.493591
Minibatch accuracy: 85.9%
Validation accuracy: 86.3%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.299259
Minibatch accuracy: 92.2%
Validation accuracy: 87.6%
Test accuracy: 93.6%
Minibatch loss at step 2000: 0.350245
Minibatch accuracy: 89.8%
Validation accuracy: 87.8%
Test accuracy: 93.8%
Minibatch loss at step 2500: 0.381930
Minibatch accuracy: 89.1%
Validation accuracy: 87.9%
Test accuracy: 94.1%
Minibatch loss at step 3000: 0.414179
Minibatch accuracy: 86.7%
Validation accuracy: 88.2%
Test accuracy: 94.2%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.500000
Initialized
Minibatch loss at step 0: 2.303874
Minibatch accuracy: 12.5%
Validation accuracy: 32.9%
Test accuracy: 36.3%
Minibatch loss at step 500: 0.383785
Minibatch accuracy: 89.8%
Validation accuracy: 85.3%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.515067
Minibatch accuracy: 85.9%
Validation accuracy: 86.1%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.360063
Minibatch accuracy: 89.1%
Validation accuracy: 87.3%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.298996
Minibatch accuracy: 89.8%
Validation accuracy: 87.9%
Test accuracy: 94.0%
Minibatch loss at step 2500: 0.390031
Minibatch accuracy: 86.7%
Validation accuracy: 87.8%
Test accuracy: 94.0%
Minibatch loss at step 3000: 0.402268
Minibatch accuracy: 85.9%
Validation accuracy: 88.2%
Test accuracy: 94.3%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.600000
Initialized
Minibatch loss at step 0: 2.310734
Minibatch accuracy: 5.5%
Validation accuracy: 28.5%
Test accuracy: 31.0%
Minibatch loss at step 500: 0.388055
Minibatch accuracy: 89.1%
Validation accuracy: 85.2%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.488217
Minibatch accuracy: 85.2%
Validation accuracy: 86.4%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.292481
Minibatch accuracy: 90.6%
Validation accuracy: 87.7%
Test accuracy: 93.6%
Minibatch loss at step 2000: 0.286522
Minibatch accuracy: 91.4%
Validation accuracy: 88.0%
Test accuracy: 94.3%
Minibatch loss at step 2500: 0.360740
Minibatch accuracy: 87.5%
Validation accuracy: 88.2%
Test accuracy: 94.3%
Minibatch loss at step 3000: 0.388230
Minibatch accuracy: 85.2%
Validation accuracy: 88.4%
Test accuracy: 94.3%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.700000
Initialized
Minibatch loss at step 0: 2.306423
Minibatch accuracy: 10.2%
Validation accuracy: 28.4%
Test accuracy: 29.9%
Minibatch loss at step 500: 0.386971
Minibatch accuracy: 87.5%
Validation accuracy: 85.2%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.455744
Minibatch accuracy: 86.7%
Validation accuracy: 86.6%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.264193
Minibatch accuracy: 90.6%
Validation accuracy: 87.7%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.287301
Minibatch accuracy: 93.0%
Validation accuracy: 88.1%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.362576
Minibatch accuracy: 88.3%
Validation accuracy: 88.2%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.360451
Minibatch accuracy: 87.5%
Validation accuracy: 88.6%
Test accuracy: 94.5%

In [70]:
tuneGrid.sort_values(by=['test_accuracy'],ascending=[False]).head(10)


Out[70]:
drop_1 drop_2 test_accuracy
0 0.0 0.0 94.93
3 0.0 0.5 94.87
5 0.0 0.7 94.79
30 0.7 0.0 94.64
4 0.0 0.6 94.58
24 0.6 0.0 94.53
35 0.7 0.7 94.50
1 0.0 0.3 94.47
28 0.6 0.6 94.46
29 0.6 0.7 94.44

We did not get an improvement in test accuracy by using dropout as the best accuracy occours for keep_prob=0 both for hidden layer 1 and hidden layer 2 that means no dropout.

Neural Networks models: 3 hidden layers


In [75]:
def create_nn3_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         dropout_vect,
                         num_steps,
                         hidden_size = 1024, 
                         num_labels=10,batch_size = 128):
    
    assert dropout_vect.shape == (3,)
    
    uniMax = 1/math.sqrt(hidden_size)
    
    with graph.as_default():
      # Input data. For the training data, we use a placeholder that will be fed
      # at run time with a training minibatch.
      tf_train_dataset = tf.placeholder(tf.float32,shape=(batch_size, image_size * image_size))
      tf_train_labels = tf.placeholder(tf.float32, shape=(batch_size, num_labels))
        
      tf_valid_dataset = tf.constant(valid_dataset)
      tf_test_dataset = tf.constant(test_dataset)

      # Hidden 1
      weights_1 = tf.Variable(tf.random_uniform([image_size * image_size, hidden_size], minval=-uniMax, maxval=uniMax),
                             name='weights_1')
      biases_1 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_1')
      hidden_1 = tf.nn.relu(tf.matmul(tf_train_dataset, weights_1) + biases_1)
      
      if dropout_vect[0]>0: 
        dropped_1 = tf.nn.dropout(hidden_1, dropout_vect[0])
      else:
        dropped_1 = hidden_1
    
      # Hidden 2
      weights_2 = tf.Variable(tf.random_uniform([hidden_size, hidden_size], minval=-uniMax, maxval=uniMax),name='weights_2')
      biases_2 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_2')
      hidden_2 = tf.nn.relu(tf.matmul(dropped_1, weights_2) + biases_2)
    
      if dropout_vect[1]>0: 
        dropped_2 = tf.nn.dropout(hidden_2, dropout_vect[1])
      else:
        dropped_2 = hidden_2
    
      # Hidden 3
      weights_3 = tf.Variable(tf.random_uniform([hidden_size, hidden_size], minval=-uniMax, maxval=uniMax),name='weights_3')
      biases_3 = tf.Variable(tf.random_uniform([hidden_size],minval=-uniMax, maxval=uniMax),name='biases_3')
      hidden_3 = tf.nn.relu(tf.matmul(dropped_2, weights_3) + biases_3)
    
      if dropout_vect[2]>0: 
        dropped_3 = tf.nn.dropout(hidden_3, dropout_vect[2])
      else:
        dropped_3 = hidden_3
        
      # Softmax 
      weights_4 = tf.Variable(tf.random_uniform([hidden_size, num_labels],minval=-uniMax, maxval=uniMax), name='weights_4')
      biases_4 = tf.Variable(tf.random_uniform([num_labels],minval=-uniMax, maxval=uniMax),name='biases_4')
      logits = tf.matmul(dropped_3, weights_4) + biases_4

      # 
      loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits, tf_train_labels))

      # Optimizer.
      global_step = tf.Variable(0)  # count the number of steps taken.
      learning_rate = tf.train.exponential_decay(0.5, global_step, 100000, 0.96, staircase=True)
      optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(loss, global_step=global_step)
      #optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(loss)


      # Predictions for the training, validation, and test data.
      train_prediction = tf.nn.softmax(logits)
    
      valid_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf_valid_dataset, weights_1) + biases_1), weights_2) + biases_2),
                  weights_3) + biases_3), weights_3) + biases_3)
      test_prediction = tf.nn.softmax(
        tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf.nn.relu(tf.matmul(tf_test_dataset, weights_1) + biases_1), weights_2) + biases_2), 
                   weights_3) + biases_3), weights_3) + biases_3)

    test_accuracy = 0
    with tf.Session(graph=graph) as session:
        tf.global_variables_initializer().run()
        print("Initialized")
        for step in range(num_steps):
            offset = (step * batch_size) % (train_labels.shape[0] - batch_size)
            
            batch_data = train_dataset[offset:(offset + batch_size), :]
            batch_labels = train_labels[offset:(offset + batch_size), :]
           
            feed_dict = {tf_train_dataset : batch_data, tf_train_labels : batch_labels}
            _, l, predictions = session.run([optimizer, loss, train_prediction], feed_dict=feed_dict)
            
            if (step % 500 == 0):
              print("Minibatch loss at step %d: %f" % (step, l))
              print("Minibatch accuracy: %.1f%%" % accuracy(predictions, batch_labels))
              print("Validation accuracy: %.1f%%" % accuracy(
              valid_prediction.eval(), valid_labels))
              test_accuracy = accuracy(test_prediction.eval(), test_labels)
              print("Test accuracy: %.1f%%" % test_accuracy)
    return test_accuracy

In [79]:
keep_probs = [0, 0.5, 0.7]
tuneGrid = pd.DataFrame.from_records([(kp1,kp2,kp3,0) for kp1 in keep_probs for kp2 in keep_probs for kp3 in keep_probs],
                          columns=['drop_1','drop_2','drop_3','test_accuracy'])
#tuneGrid.head()
for i in range(0,tuneGrid.shape[0]):
  drop_1 , drop_2 , drop_3 = tuneGrid.iloc[i,0] , tuneGrid.iloc[i,1] , tuneGrid.iloc[i,2]
  print("\n>>>>>>>>>> keep_prob_1: %f ---- keep_prob_2: %f ---- keep_prob_3: %f" % (drop_1 , drop_2, drop_3))
  graph = tf.Graph()
  tuneGrid.iloc[i,3] = create_nn2_model_dropout_and_run(graph,
                         train_dataset,
                         train_labels,
                         valid_dataset,
                         valid_labels,
                         test_dataset,
                         test_labels,
                         np.array([drop_1,drop_2]),
                         num_steps)


>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.307701
Minibatch accuracy: 8.6%
Validation accuracy: 37.3%
Test accuracy: 40.4%
Minibatch loss at step 500: 0.360584
Minibatch accuracy: 89.8%
Validation accuracy: 85.6%
Test accuracy: 92.3%
Minibatch loss at step 1000: 0.469022
Minibatch accuracy: 84.4%
Validation accuracy: 86.7%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.253226
Minibatch accuracy: 91.4%
Validation accuracy: 88.2%
Test accuracy: 94.1%
Minibatch loss at step 2000: 0.240038
Minibatch accuracy: 93.8%
Validation accuracy: 88.5%
Test accuracy: 94.6%
Minibatch loss at step 2500: 0.289389
Minibatch accuracy: 90.6%
Validation accuracy: 89.2%
Test accuracy: 95.1%
Minibatch loss at step 3000: 0.322523
Minibatch accuracy: 88.3%
Validation accuracy: 89.2%
Test accuracy: 95.1%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.304984
Minibatch accuracy: 12.5%
Validation accuracy: 29.4%
Test accuracy: 31.6%
Minibatch loss at step 500: 0.341077
Minibatch accuracy: 89.8%
Validation accuracy: 85.7%
Test accuracy: 92.2%
Minibatch loss at step 1000: 0.471969
Minibatch accuracy: 84.4%
Validation accuracy: 87.0%
Test accuracy: 93.2%
Minibatch loss at step 1500: 0.251770
Minibatch accuracy: 91.4%
Validation accuracy: 88.2%
Test accuracy: 93.9%
Minibatch loss at step 2000: 0.250893
Minibatch accuracy: 94.5%
Validation accuracy: 88.8%
Test accuracy: 94.9%
Minibatch loss at step 2500: 0.297448
Minibatch accuracy: 89.8%
Validation accuracy: 89.0%
Test accuracy: 95.0%
Minibatch loss at step 3000: 0.317588
Minibatch accuracy: 89.8%
Validation accuracy: 89.3%
Test accuracy: 95.2%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.302516
Minibatch accuracy: 10.2%
Validation accuracy: 32.4%
Test accuracy: 34.7%
Minibatch loss at step 500: 0.345148
Minibatch accuracy: 90.6%
Validation accuracy: 85.6%
Test accuracy: 92.2%
Minibatch loss at step 1000: 0.456426
Minibatch accuracy: 85.2%
Validation accuracy: 86.8%
Test accuracy: 93.2%
Minibatch loss at step 1500: 0.255399
Minibatch accuracy: 91.4%
Validation accuracy: 88.2%
Test accuracy: 94.1%
Minibatch loss at step 2000: 0.238993
Minibatch accuracy: 93.8%
Validation accuracy: 88.6%
Test accuracy: 94.8%
Minibatch loss at step 2500: 0.292971
Minibatch accuracy: 89.8%
Validation accuracy: 89.0%
Test accuracy: 95.0%
Minibatch loss at step 3000: 0.336966
Minibatch accuracy: 89.8%
Validation accuracy: 89.2%
Test accuracy: 95.1%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.295936
Minibatch accuracy: 7.0%
Validation accuracy: 28.4%
Test accuracy: 30.8%
Minibatch loss at step 500: 0.353784
Minibatch accuracy: 88.3%
Validation accuracy: 85.5%
Test accuracy: 92.1%
Minibatch loss at step 1000: 0.445134
Minibatch accuracy: 86.7%
Validation accuracy: 86.6%
Test accuracy: 93.1%
Minibatch loss at step 1500: 0.287672
Minibatch accuracy: 92.2%
Validation accuracy: 87.9%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.288302
Minibatch accuracy: 92.2%
Validation accuracy: 88.2%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.297238
Minibatch accuracy: 90.6%
Validation accuracy: 88.7%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.384665
Minibatch accuracy: 89.1%
Validation accuracy: 88.7%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.301717
Minibatch accuracy: 6.2%
Validation accuracy: 26.6%
Test accuracy: 28.5%
Minibatch loss at step 500: 0.380463
Minibatch accuracy: 89.8%
Validation accuracy: 85.6%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.477643
Minibatch accuracy: 85.2%
Validation accuracy: 86.8%
Test accuracy: 93.2%
Minibatch loss at step 1500: 0.272061
Minibatch accuracy: 92.2%
Validation accuracy: 87.9%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.297947
Minibatch accuracy: 92.2%
Validation accuracy: 88.6%
Test accuracy: 94.6%
Minibatch loss at step 2500: 0.322675
Minibatch accuracy: 89.1%
Validation accuracy: 88.4%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.355782
Minibatch accuracy: 87.5%
Validation accuracy: 89.0%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.300598
Minibatch accuracy: 12.5%
Validation accuracy: 24.0%
Test accuracy: 26.1%
Minibatch loss at step 500: 0.380110
Minibatch accuracy: 89.1%
Validation accuracy: 85.4%
Test accuracy: 91.9%
Minibatch loss at step 1000: 0.483790
Minibatch accuracy: 84.4%
Validation accuracy: 86.7%
Test accuracy: 93.0%
Minibatch loss at step 1500: 0.248392
Minibatch accuracy: 93.8%
Validation accuracy: 87.9%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.239834
Minibatch accuracy: 93.8%
Validation accuracy: 88.4%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.302955
Minibatch accuracy: 90.6%
Validation accuracy: 88.6%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.374534
Minibatch accuracy: 88.3%
Validation accuracy: 88.7%
Test accuracy: 94.8%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.307483
Minibatch accuracy: 6.2%
Validation accuracy: 27.8%
Test accuracy: 29.6%
Minibatch loss at step 500: 0.340085
Minibatch accuracy: 90.6%
Validation accuracy: 85.8%
Test accuracy: 92.2%
Minibatch loss at step 1000: 0.493526
Minibatch accuracy: 85.2%
Validation accuracy: 86.4%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.282992
Minibatch accuracy: 90.6%
Validation accuracy: 88.0%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.245270
Minibatch accuracy: 92.2%
Validation accuracy: 88.6%
Test accuracy: 94.8%
Minibatch loss at step 2500: 0.322314
Minibatch accuracy: 89.8%
Validation accuracy: 88.8%
Test accuracy: 94.7%
Minibatch loss at step 3000: 0.338469
Minibatch accuracy: 88.3%
Validation accuracy: 89.2%
Test accuracy: 94.8%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.302600
Minibatch accuracy: 10.9%
Validation accuracy: 30.2%
Test accuracy: 32.5%
Minibatch loss at step 500: 0.349657
Minibatch accuracy: 89.1%
Validation accuracy: 85.5%
Test accuracy: 92.1%
Minibatch loss at step 1000: 0.483011
Minibatch accuracy: 84.4%
Validation accuracy: 86.8%
Test accuracy: 93.2%
Minibatch loss at step 1500: 0.249873
Minibatch accuracy: 92.2%
Validation accuracy: 88.1%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.245125
Minibatch accuracy: 94.5%
Validation accuracy: 88.7%
Test accuracy: 94.6%
Minibatch loss at step 2500: 0.331831
Minibatch accuracy: 89.1%
Validation accuracy: 88.9%
Test accuracy: 94.8%
Minibatch loss at step 3000: 0.353008
Minibatch accuracy: 87.5%
Validation accuracy: 88.9%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.000000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.301033
Minibatch accuracy: 9.4%
Validation accuracy: 22.5%
Test accuracy: 23.9%
Minibatch loss at step 500: 0.357615
Minibatch accuracy: 89.8%
Validation accuracy: 85.5%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.498823
Minibatch accuracy: 86.7%
Validation accuracy: 86.9%
Test accuracy: 93.4%
Minibatch loss at step 1500: 0.234258
Minibatch accuracy: 93.0%
Validation accuracy: 88.0%
Test accuracy: 94.0%
Minibatch loss at step 2000: 0.252327
Minibatch accuracy: 93.8%
Validation accuracy: 88.6%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.338273
Minibatch accuracy: 89.1%
Validation accuracy: 88.7%
Test accuracy: 94.9%
Minibatch loss at step 3000: 0.341963
Minibatch accuracy: 89.1%
Validation accuracy: 89.1%
Test accuracy: 95.0%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.307396
Minibatch accuracy: 11.7%
Validation accuracy: 29.2%
Test accuracy: 31.4%
Minibatch loss at step 500: 0.386062
Minibatch accuracy: 88.3%
Validation accuracy: 85.2%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.504871
Minibatch accuracy: 85.2%
Validation accuracy: 85.9%
Test accuracy: 92.3%
Minibatch loss at step 1500: 0.289783
Minibatch accuracy: 89.1%
Validation accuracy: 87.3%
Test accuracy: 93.4%
Minibatch loss at step 2000: 0.271553
Minibatch accuracy: 93.0%
Validation accuracy: 87.6%
Test accuracy: 93.8%
Minibatch loss at step 2500: 0.340984
Minibatch accuracy: 89.1%
Validation accuracy: 88.0%
Test accuracy: 94.1%
Minibatch loss at step 3000: 0.368865
Minibatch accuracy: 85.9%
Validation accuracy: 88.3%
Test accuracy: 94.2%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.302458
Minibatch accuracy: 8.6%
Validation accuracy: 25.9%
Test accuracy: 28.1%
Minibatch loss at step 500: 0.376510
Minibatch accuracy: 89.1%
Validation accuracy: 85.1%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.528742
Minibatch accuracy: 85.9%
Validation accuracy: 86.0%
Test accuracy: 92.4%
Minibatch loss at step 1500: 0.301931
Minibatch accuracy: 89.8%
Validation accuracy: 87.5%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.309805
Minibatch accuracy: 93.0%
Validation accuracy: 87.7%
Test accuracy: 94.0%
Minibatch loss at step 2500: 0.352233
Minibatch accuracy: 87.5%
Validation accuracy: 88.0%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.378735
Minibatch accuracy: 89.1%
Validation accuracy: 88.4%
Test accuracy: 94.4%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.295499
Minibatch accuracy: 12.5%
Validation accuracy: 27.2%
Test accuracy: 29.9%
Minibatch loss at step 500: 0.381968
Minibatch accuracy: 88.3%
Validation accuracy: 85.0%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.497010
Minibatch accuracy: 86.7%
Validation accuracy: 86.1%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.278064
Minibatch accuracy: 89.8%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.269744
Minibatch accuracy: 94.5%
Validation accuracy: 87.9%
Test accuracy: 94.2%
Minibatch loss at step 2500: 0.337200
Minibatch accuracy: 89.8%
Validation accuracy: 88.0%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.401494
Minibatch accuracy: 85.2%
Validation accuracy: 88.1%
Test accuracy: 94.1%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.302359
Minibatch accuracy: 6.2%
Validation accuracy: 31.8%
Test accuracy: 34.0%
Minibatch loss at step 500: 0.411358
Minibatch accuracy: 88.3%
Validation accuracy: 84.8%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.566983
Minibatch accuracy: 82.8%
Validation accuracy: 85.5%
Test accuracy: 92.0%
Minibatch loss at step 1500: 0.350257
Minibatch accuracy: 91.4%
Validation accuracy: 87.1%
Test accuracy: 93.2%
Minibatch loss at step 2000: 0.344485
Minibatch accuracy: 89.8%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 2500: 0.433242
Minibatch accuracy: 89.1%
Validation accuracy: 87.5%
Test accuracy: 93.7%
Minibatch loss at step 3000: 0.434307
Minibatch accuracy: 87.5%
Validation accuracy: 87.7%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.300098
Minibatch accuracy: 11.7%
Validation accuracy: 27.7%
Test accuracy: 30.0%
Minibatch loss at step 500: 0.390960
Minibatch accuracy: 89.8%
Validation accuracy: 84.7%
Test accuracy: 91.3%
Minibatch loss at step 1000: 0.512336
Minibatch accuracy: 82.8%
Validation accuracy: 86.0%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.316626
Minibatch accuracy: 89.1%
Validation accuracy: 87.0%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.298494
Minibatch accuracy: 91.4%
Validation accuracy: 87.3%
Test accuracy: 93.8%
Minibatch loss at step 2500: 0.407798
Minibatch accuracy: 86.7%
Validation accuracy: 87.5%
Test accuracy: 93.9%
Minibatch loss at step 3000: 0.410648
Minibatch accuracy: 87.5%
Validation accuracy: 87.6%
Test accuracy: 93.8%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.307862
Minibatch accuracy: 10.9%
Validation accuracy: 23.8%
Test accuracy: 25.2%
Minibatch loss at step 500: 0.368996
Minibatch accuracy: 89.8%
Validation accuracy: 84.9%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.505228
Minibatch accuracy: 82.8%
Validation accuracy: 85.9%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.283785
Minibatch accuracy: 91.4%
Validation accuracy: 87.2%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.317570
Minibatch accuracy: 92.2%
Validation accuracy: 87.6%
Test accuracy: 93.6%
Minibatch loss at step 2500: 0.413433
Minibatch accuracy: 85.9%
Validation accuracy: 87.4%
Test accuracy: 93.9%
Minibatch loss at step 3000: 0.451078
Minibatch accuracy: 85.2%
Validation accuracy: 87.7%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.305330
Minibatch accuracy: 9.4%
Validation accuracy: 23.5%
Test accuracy: 24.6%
Minibatch loss at step 500: 0.414282
Minibatch accuracy: 88.3%
Validation accuracy: 85.0%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.535639
Minibatch accuracy: 84.4%
Validation accuracy: 85.9%
Test accuracy: 92.2%
Minibatch loss at step 1500: 0.301088
Minibatch accuracy: 91.4%
Validation accuracy: 87.1%
Test accuracy: 93.5%
Minibatch loss at step 2000: 0.327726
Minibatch accuracy: 92.2%
Validation accuracy: 87.8%
Test accuracy: 93.9%
Minibatch loss at step 2500: 0.393329
Minibatch accuracy: 87.5%
Validation accuracy: 87.9%
Test accuracy: 94.0%
Minibatch loss at step 3000: 0.399720
Minibatch accuracy: 87.5%
Validation accuracy: 88.1%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.300828
Minibatch accuracy: 7.8%
Validation accuracy: 33.9%
Test accuracy: 36.5%
Minibatch loss at step 500: 0.418009
Minibatch accuracy: 88.3%
Validation accuracy: 85.1%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.508641
Minibatch accuracy: 83.6%
Validation accuracy: 85.7%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.316903
Minibatch accuracy: 89.8%
Validation accuracy: 87.2%
Test accuracy: 93.4%
Minibatch loss at step 2000: 0.296127
Minibatch accuracy: 93.0%
Validation accuracy: 87.9%
Test accuracy: 94.1%
Minibatch loss at step 2500: 0.386357
Minibatch accuracy: 87.5%
Validation accuracy: 87.8%
Test accuracy: 94.0%
Minibatch loss at step 3000: 0.395590
Minibatch accuracy: 87.5%
Validation accuracy: 88.0%
Test accuracy: 94.3%

>>>>>>>>>> keep_prob_1: 0.500000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.296510
Minibatch accuracy: 14.8%
Validation accuracy: 22.1%
Test accuracy: 22.9%
Minibatch loss at step 500: 0.380850
Minibatch accuracy: 88.3%
Validation accuracy: 85.0%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.450976
Minibatch accuracy: 87.5%
Validation accuracy: 86.1%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.296183
Minibatch accuracy: 91.4%
Validation accuracy: 87.1%
Test accuracy: 93.3%
Minibatch loss at step 2000: 0.338359
Minibatch accuracy: 93.0%
Validation accuracy: 87.4%
Test accuracy: 93.7%
Minibatch loss at step 2500: 0.354809
Minibatch accuracy: 89.8%
Validation accuracy: 87.8%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.411384
Minibatch accuracy: 89.1%
Validation accuracy: 88.2%
Test accuracy: 94.0%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.297658
Minibatch accuracy: 10.9%
Validation accuracy: 30.1%
Test accuracy: 31.9%
Minibatch loss at step 500: 0.357413
Minibatch accuracy: 90.6%
Validation accuracy: 85.4%
Test accuracy: 92.0%
Minibatch loss at step 1000: 0.508993
Minibatch accuracy: 84.4%
Validation accuracy: 86.7%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.259119
Minibatch accuracy: 93.8%
Validation accuracy: 87.7%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.283875
Minibatch accuracy: 92.2%
Validation accuracy: 88.5%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.355792
Minibatch accuracy: 89.8%
Validation accuracy: 88.7%
Test accuracy: 94.4%
Minibatch loss at step 3000: 0.342225
Minibatch accuracy: 86.7%
Validation accuracy: 89.2%
Test accuracy: 94.8%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.305208
Minibatch accuracy: 5.5%
Validation accuracy: 18.4%
Test accuracy: 19.4%
Minibatch loss at step 500: 0.351363
Minibatch accuracy: 90.6%
Validation accuracy: 85.3%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.468211
Minibatch accuracy: 86.7%
Validation accuracy: 86.7%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.269485
Minibatch accuracy: 92.2%
Validation accuracy: 87.8%
Test accuracy: 93.9%
Minibatch loss at step 2000: 0.290606
Minibatch accuracy: 93.8%
Validation accuracy: 88.3%
Test accuracy: 94.4%
Minibatch loss at step 2500: 0.327652
Minibatch accuracy: 89.8%
Validation accuracy: 88.5%
Test accuracy: 94.8%
Minibatch loss at step 3000: 0.322242
Minibatch accuracy: 88.3%
Validation accuracy: 88.6%
Test accuracy: 94.5%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.000000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.305279
Minibatch accuracy: 7.8%
Validation accuracy: 28.4%
Test accuracy: 31.4%
Minibatch loss at step 500: 0.355813
Minibatch accuracy: 89.8%
Validation accuracy: 85.3%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.480295
Minibatch accuracy: 85.9%
Validation accuracy: 86.4%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.271640
Minibatch accuracy: 91.4%
Validation accuracy: 87.7%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.273186
Minibatch accuracy: 93.8%
Validation accuracy: 88.1%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.358344
Minibatch accuracy: 89.8%
Validation accuracy: 88.5%
Test accuracy: 94.6%
Minibatch loss at step 3000: 0.363185
Minibatch accuracy: 87.5%
Validation accuracy: 88.8%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.305288
Minibatch accuracy: 10.2%
Validation accuracy: 27.8%
Test accuracy: 29.9%
Minibatch loss at step 500: 0.366503
Minibatch accuracy: 87.5%
Validation accuracy: 85.1%
Test accuracy: 91.6%
Minibatch loss at step 1000: 0.530955
Minibatch accuracy: 85.2%
Validation accuracy: 86.1%
Test accuracy: 92.6%
Minibatch loss at step 1500: 0.269701
Minibatch accuracy: 93.8%
Validation accuracy: 87.7%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.297010
Minibatch accuracy: 93.8%
Validation accuracy: 87.9%
Test accuracy: 94.3%
Minibatch loss at step 2500: 0.298240
Minibatch accuracy: 89.1%
Validation accuracy: 88.0%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.374658
Minibatch accuracy: 89.1%
Validation accuracy: 88.5%
Test accuracy: 94.6%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.305176
Minibatch accuracy: 10.2%
Validation accuracy: 30.7%
Test accuracy: 32.4%
Minibatch loss at step 500: 0.391806
Minibatch accuracy: 89.1%
Validation accuracy: 85.3%
Test accuracy: 91.7%
Minibatch loss at step 1000: 0.490209
Minibatch accuracy: 84.4%
Validation accuracy: 86.3%
Test accuracy: 92.7%
Minibatch loss at step 1500: 0.303743
Minibatch accuracy: 89.8%
Validation accuracy: 87.5%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.306243
Minibatch accuracy: 91.4%
Validation accuracy: 88.1%
Test accuracy: 94.1%
Minibatch loss at step 2500: 0.335607
Minibatch accuracy: 90.6%
Validation accuracy: 88.2%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.380845
Minibatch accuracy: 88.3%
Validation accuracy: 88.7%
Test accuracy: 94.4%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.500000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.320172
Minibatch accuracy: 6.2%
Validation accuracy: 27.2%
Test accuracy: 29.6%
Minibatch loss at step 500: 0.380462
Minibatch accuracy: 89.1%
Validation accuracy: 85.0%
Test accuracy: 91.5%
Minibatch loss at step 1000: 0.502880
Minibatch accuracy: 85.2%
Validation accuracy: 86.6%
Test accuracy: 92.9%
Minibatch loss at step 1500: 0.281713
Minibatch accuracy: 92.2%
Validation accuracy: 87.5%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.297843
Minibatch accuracy: 92.2%
Validation accuracy: 88.0%
Test accuracy: 94.2%
Minibatch loss at step 2500: 0.376167
Minibatch accuracy: 88.3%
Validation accuracy: 88.1%
Test accuracy: 94.2%
Minibatch loss at step 3000: 0.399874
Minibatch accuracy: 87.5%
Validation accuracy: 88.7%
Test accuracy: 94.4%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.000000
Initialized
Minibatch loss at step 0: 2.298923
Minibatch accuracy: 13.3%
Validation accuracy: 28.2%
Test accuracy: 30.1%
Minibatch loss at step 500: 0.374988
Minibatch accuracy: 90.6%
Validation accuracy: 85.2%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.464464
Minibatch accuracy: 86.7%
Validation accuracy: 86.1%
Test accuracy: 92.5%
Minibatch loss at step 1500: 0.259919
Minibatch accuracy: 91.4%
Validation accuracy: 87.8%
Test accuracy: 93.8%
Minibatch loss at step 2000: 0.306579
Minibatch accuracy: 92.2%
Validation accuracy: 88.0%
Test accuracy: 94.5%
Minibatch loss at step 2500: 0.320197
Minibatch accuracy: 89.8%
Validation accuracy: 88.2%
Test accuracy: 94.3%
Minibatch loss at step 3000: 0.369080
Minibatch accuracy: 87.5%
Validation accuracy: 88.8%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.500000
Initialized
Minibatch loss at step 0: 2.296652
Minibatch accuracy: 14.8%
Validation accuracy: 30.7%
Test accuracy: 33.1%
Minibatch loss at step 500: 0.351461
Minibatch accuracy: 89.8%
Validation accuracy: 85.3%
Test accuracy: 91.8%
Minibatch loss at step 1000: 0.500775
Minibatch accuracy: 84.4%
Validation accuracy: 86.3%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.281437
Minibatch accuracy: 91.4%
Validation accuracy: 87.6%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.284011
Minibatch accuracy: 92.2%
Validation accuracy: 88.4%
Test accuracy: 94.6%
Minibatch loss at step 2500: 0.352328
Minibatch accuracy: 88.3%
Validation accuracy: 88.3%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.400430
Minibatch accuracy: 87.5%
Validation accuracy: 88.6%
Test accuracy: 94.7%

>>>>>>>>>> keep_prob_1: 0.700000 ---- keep_prob_2: 0.700000 ---- keep_prob_3: 0.700000
Initialized
Minibatch loss at step 0: 2.312369
Minibatch accuracy: 7.8%
Validation accuracy: 27.9%
Test accuracy: 30.4%
Minibatch loss at step 500: 0.386162
Minibatch accuracy: 88.3%
Validation accuracy: 85.3%
Test accuracy: 91.9%
Minibatch loss at step 1000: 0.529773
Minibatch accuracy: 84.4%
Validation accuracy: 86.4%
Test accuracy: 92.8%
Minibatch loss at step 1500: 0.261001
Minibatch accuracy: 91.4%
Validation accuracy: 87.7%
Test accuracy: 93.7%
Minibatch loss at step 2000: 0.260295
Minibatch accuracy: 93.8%
Validation accuracy: 88.0%
Test accuracy: 94.3%
Minibatch loss at step 2500: 0.303135
Minibatch accuracy: 90.6%
Validation accuracy: 88.4%
Test accuracy: 94.5%
Minibatch loss at step 3000: 0.364417
Minibatch accuracy: 89.8%
Validation accuracy: 88.6%
Test accuracy: 94.5%

In [80]:
tuneGrid.sort_values(by=['test_accuracy'],ascending=[False]).head(10)


Out[80]:
drop_1 drop_2 drop_3 test_accuracy
1 0.0 0.0 0.5 95.15
0 0.0 0.0 0.0 95.11
2 0.0 0.0 0.7 95.07
8 0.0 0.7 0.7 95.02
6 0.0 0.7 0.0 94.84
5 0.0 0.5 0.7 94.83
18 0.7 0.0 0.0 94.82
24 0.7 0.7 0.0 94.74
3 0.0 0.5 0.0 94.73
7 0.0 0.7 0.5 94.72

We did not get an improvement in test accuracy by using dropout as although the best accuracy occours for keep_prob = 0 for hidden layers 1 and 2 and keep_prob = 0.5 for layers 3 the difference with the second best combination that is the no dropout option for all hidden layers is very tiny.

Conclusions

  • Neural Networks models: 1 hidden layer: dropout not effective
    • We did not get an improvement in test accuracy by using dropout as the best accuracy occours for keep_prob=0 that means no dropout
  • Neural Networks models: 2 hidden layers: dropout not effective
    • We did not get an improvement in test accuracy by using dropout as the best accuracy occours for keep_prob=0 both for hidden layer 1 and hidden layer 2 that means no dropout
  • Neural Networks models: 3 hidden layers: dropout not effective
    • We did not get an improvement in test accuracy by using dropout as although the best accuracy occours for keep_prob = 0 for hidden layers 1 and 2 and keep_prob = 0.5 for layers 3 the difference with the second best combination that is the no dropout option for all hidden layers is very tiny.

Also, considering at most 3 hidden layers, the best model comes with 3 hidden layers but without L2 regularization and/or dropout with a test accuracy ~95.1%