title: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(), in image classification problem
body: <p>I doing image classification using predefined model vgg16, I got 89% accuracy in validation data, To increase the model accuracy, I did an image augmentation, but got some errors. please help me on how to fit for the model.
  here my code.</p>
  
  <pre><code>train_datagen = ImageDataGenerator(
          rescale=1./255,
          shear_range=0.2,
          zoom_range=0.2,
          horizontal_flip=True)
  
  train_datagen.fit(X_train)
  </code></pre>
  
  <p>I am using the input image are 64x64x3. 
  I am a fit model like this.</p>
  
  <pre><code>history = model.fit_generator(
        train_datagen.flow(X_train,y_train),
        steps_per_epoch=(X_train)/32 ,
        epochs=30,
        validation_data=(X_test,y_test),
        validation_steps=(X_test)/32,
  verbose=1)
  
  Epoch 1/30
  ---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-30-ff3a9aaa40da&gt; in &lt;module&gt;()
        5       validation_data=(X_test,y_test),
        6       validation_steps=(X_test)/32,
  ----&gt; 7 verbose=1)
  
  /usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
       89                 warnings.warn('Update your `' + object_name + '` call to the ' +
       90                               'Keras 2 API: ' + signature, stacklevel=2)
  ---&gt; 91             return func(*args, **kwargs)
       92         wrapper._original_function = func
       93         return wrapper
  
  /usr/local/lib/python3.6/dist-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
     1416             use_multiprocessing=use_multiprocessing,
     1417             shuffle=shuffle,
  -&gt; 1418             initial_epoch=initial_epoch)
     1419 
     1420     @interfaces.legacy_generator_methods_support
  
  /usr/local/lib/python3.6/dist-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
      178             steps_done = 0
      179             batch_index = 0
  --&gt; 180             while steps_done &lt; steps_per_epoch:
      181                 generator_output = next(output_generator)
      182 
  
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>