December 2018
Beginner to intermediate
684 pages
21h 9m
English
To illustrate the benefit of adding depth to the autoencoder, we build a three-layer feedforward model that successively compresses the input from 784 to 128, 64, and 34 units, respectively:
input_ = Input(shape=(input_size,))x = Dense(128, activation='relu', name='Encoding1')(input_)x = Dense(64, activation='relu', name='Encoding2')(x)encoding_deep = Dense(32, activation='relu', name='Encoding3')(x)x = Dense(64, activation='relu', name='Decoding1')(encoding_deep)x = Dense(128, activation='relu', name='Decoding2')(x)decoding_deep = Dense(input_size, activation='sigmoid', name='Decoding3')(x)
The resulting model has over 222,000 parameters, more than four times the capacity of the preceding single-layer model: ...