Auto-encoder Mismatch Dimension Error

I am trying to reconstruct images using Conv Autoencoder, but I get an error related to dimensions, could you find a solution, thanks,

Basically fist I want to test the model on reconstructing the same input data which are images, then if the model worked fine, I need to model images to maps,

In this case, can I just change the data from image_data to map_data as shown in the code below:

from keras.layers import Input, Dense, Conv2D, MaxPooling2D, UpSampling2D
from keras.models import Model
from keras import backend as K
from keras.callbacks import TensorBoard
import numpy as np
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.utils import np_utils
import matplotlib.pyplot as plt
import matplotlib
import os
from PIL import Image
from numpy import *
from sklearn.utils import shuffle
from sklearn.cross_validation import train_test_split
from keras.preprocessing.image import ImageDataGenerator,array_to_img, img_to_array, load_img

image_data='C:/Users/user_PC/Desktop/Image2Map/Samples'
map_data='C:/Users/user_PC/Desktop/Image2Map/Samples'

K.set_image_dim_ordering('tf')

input_img = Input(batch_shape=(1024, 106, 106,3))


x = Conv2D(16, (3, 3), activation='relu', padding='same')(input_img)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
encoded = MaxPooling2D((2, 2), padding='same')(x)


x = Conv2D(8, (3, 3), activation='relu', padding='same')(encoded)
x = UpSampling2D((2, 2))(x)
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(16, (3, 3), activation='relu')(x)
x = UpSampling2D((2, 2))(x)
decoded = Conv2D(1, (3, 3), activation='sigmoid', padding='same')(x)

autoencoder = Model(input_img, decoded)
autoencoder.compile(optimizer='adadelta', loss='binary_crossentropy')



train_datagen = ImageDataGenerator(
        rescale=1. / 255)

test_datagen = ImageDataGenerator(rescale=1. / 255)

train_generator = train_datagen.flow_from_directory(
    image_data,
    target_size=(106, 106),
    batch_size=4,
    class_mode=None)

validation_generator = test_datagen.flow_from_directory(
    image_data,
    target_size=(106, 106),
    batch_size=4,
    class_mode=None)

imgs = np.concatenate([train_generator.next()[0] for i in range(1024)])

autoencoder.fit_generator(generator=(imgs,imgs),
    samples_per_epoch=1024 // 4,
    epochs=10,
    validation_data=(imgs,imgs),
    validation_steps=1024 // 4)



decoded_imgs = autoencoder.predict(image_data)

n = 10
plt.figure(figsize=(20, 4))
for i in range(n):
    # display original
    ax = plt.subplot(2, n, i)
    plt.imshow(image_data[i].reshape(106, 106))
    plt.gray()
    ax.get_xaxis().set_visible(False)
    ax.get_yaxis().set_visible(False)

    # display reconstruction
    ax = plt.subplot(2, n, i + n)
    plt.imshow(decoded_imgs[i].reshape(106, 106))
    plt.gray()
    ax.get_xaxis().set_visible(False)
    ax.get_yaxis().set_visible(False)
plt.show()