While reproducing the examples from the blog for a lecture I realised that the losses dont add up.
Plain 784->32->784 indeed gives 0.10 easily and can even lower.
Second step is the activity regularization.
from keras import regularizers
encoding_dim = 32
input_img = Input(shape=(784,))
# add a Dense layer with a L1 activity regularizer
encoded = Dense(encoding_dim, activation='relu',
activity_regularizer=regularizers.activity_l1(10e-5))(input_img)
decoded = Dense(784, activation='sigmoid')(encoded)
autoencoder = Model(input=input_img, output=decoded)
# this model maps an input to its encoded representation
encoder = Model(input=input_img, output=encoded)
# create a placeholder for an encoded (32-dimensional) input
encoded_input = Input(shape=(encoding_dim,))
# retrieve the last layer of the autoencoder model
decoder_layer = autoencoder.layers[-1]
# create the decoder model
decoder = Model(input=encoded_input, output=decoder_layer(encoded_input))
autoencoder.compile(optimizer='adadelta', loss='binary_crossentropy')
Going by the book I cannot get anything better than: 0.26 after 300+ epochs
Has keras underling code changed since the post or something?
Im using theano with latest keras.
While reproducing the examples from the blog for a lecture I realised that the losses dont add up.
Plain 784->32->784 indeed gives 0.10 easily and can even lower. Second step is the activity regularization.
Going by the book I cannot get anything better than: 0.26 after 300+ epochs
Has keras underling code changed since the post or something? Im using theano with latest keras.