Building the model

Define the model that takes an input image and returns the images generated by the decoder, which is reconstructed images:

model = Model(input_image, decoder)

Let's compile the model with loss as binary cross-entropy and we use adadelta as our optimizer:

model.compile(optimizer='adadelta', loss='binary_crossentropy')

Then, train the model as follows:

model.fit(x_train, x_train, epochs=50,batch_size=128, shuffle=True, validation_data=(x_test, x_test))
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset