Now we define the encoder layer, which takes the images as an input and returns the encodings.
Define the size of the encodings:
encoding_dim = 32
Define the placeholders for the input:
input_image = Input(shape=(784,))
Define the encoder which takes input_image and returns the encodings:
encoder = Dense(encoding_dim, activation='relu')(input_image)