title: TensorFlow Keras Optimise prediction
body: <p>I'm Using tensorflow and keras to predict handwrting digits. For training I'm using nmist dataset.
  the accuracy is about 98.8% after training. but sometimes in test its confuse between 4 and 9 , 7 and 3, i'm alerady optimize the image input with opencv, like remove noise, rescale, threshold etc.<br>
  <strong>What should i do next to improved this prdiction accuracy?</strong></p>
  
  <p>My plan is add more sample, and resize the sample image from 28x28 to 56x56.<br>
  <strong>Will this affect accuracy?</strong></p>
  
  <p>This my model for training: </p>
  
  <pre class="lang-py prettyprint-override"><code>epoc=15, batch size=64
  
  def build_model():
      model = Sequential()
      # add Convolutional layers
      model.add(Conv2D(filters=32, kernel_size=(3,3), activation='relu', padding='same', input_shape=input_shape))
      model.add(MaxPooling2D(pool_size=(2,2)))
      model.add(Conv2D(filters=64, kernel_size=(3,3), activation='relu', padding='same'))
      model.add(MaxPooling2D(pool_size=(2,2)))
      model.add(Conv2D(filters=64, kernel_size=(3,3), activation='relu', padding='same'))
      model.add(MaxPooling2D(pool_size=(2,2)))    
      model.add(Flatten())
      # Densely connected layers
      model.add(Dense(128, activation='relu'))
  
      # output layer
      model.add(Dense(10, activation='softmax'))
  
      # compile with adam optimizer &amp; categorical_crossentropy loss function
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
  
      return model
  </code></pre>