title: Preprocessing of a single image for prediction. ( CNN build and trained with Keras)
body: <p>Had a lack of understanding how to make a single prediction with existing trained model( keras Sequential.</p>
  
  <p>The preprocessing and training of CNN looked like this:
      from keras.preprocessing.image import ImageDataGenerator</p>
  
  <pre><code>train_datagen = ImageDataGenerator(rescale=1./255,
                                     shear_range=0.2,
                                     zoom_range=0.2,
                                     horizontal_flip=True)
  
  test_datagen = ImageDataGenerator(rescale=1./255)
  
  training_set = train_datagen.flow_from_directory('dataset/training_set',
                                                   target_size=(64, 64),
                                                   batch_size=32,
                                                   class_mode='binary')
  
  test_set = test_datagen.flow_from_directory('dataset/test_set',
                                              target_size=(64, 64),
                                              batch_size=32,
                                              class_mode='binary')
  
  classifier.fit_generator(training_set,
                           steps_per_epoch=8000,
                           epochs=25,
                           validation_data=test_set,
                           validation_steps=2000)
  </code></pre>
  
  <p>As the predict_generator did not work I stucked...</p>