title: batch_size = x.shape[0] AttributeError: 'tuple' object has no attribute 'shape'
body: <p>This code  combine image and mask  for image detection?<br>
  How can i correct that error?</p>
  
  <blockquote>
    <p>batch_size = x.shape[0]  AttributeError: 'tuple' object has no attribute 'shape'</p>
  </blockquote>
  
  <p>This is the code used for training: </p>
  
  <pre><code>train_datagen = ImageDataGenerator(
              rescale=1. / 255,
              shear_range=0.2,
              zoom_range=0.2,
              horizontal_flip=True)
  train_datagen_1 = ImageDataGenerator(
              rescale=1. / 255,
              shear_range=0.2,
              zoom_range=0.2,
              horizontal_flip=True)
  
  
  train_generator = train_datagen.flow_from_directory(
              train_data_dir,
              target_size=(200, 150),
              batch_size=1
            )
  train_generator_1= train_datagen_1.flow_from_directory(
              train_data_dir_1,
              target_size=(200, 150),
              batch_size=1)
  train_generator_2 = zip( train_generator, train_generator_1)
  
  model.fit_generator(
              train_generator_2,
              steps_per_epoch=nb_train_samples // batch_size,
              epochs=50)
  </code></pre>
  
  <p>This is the model I'm using:</p>
  
  <pre><code>model = Sequential() 
  model.add(Conv2D(32, (3, 3), input_shape=(200, 150, 3))) 
  model.add(Activation('relu')) 
  model.add(MaxPooling2D(pool_size=(2, 2))) 
  model.add(Flatten()) 
  model.add(Dense(20)) model.add(Activation('relu')) 
  model.add(Dropout(0.5)) 
  model.add(Dense(90000)) 
  model.add(Activation('sigmoid')) 
  model.compile(loss='mse', optimizer='rmsprop', metrics=['accuracy'])
  </code></pre>