def conv_autoencode_mnist():
(x_train, y_train), (x_test, y_test) = load_mnist(flatten=False)
autoencoder = build_conv_autoencoder()
autoencoder.summary()
autoencoder.fit(x_train, x_train,
epochs=55,
batch_size=128,
shuffle=True,
validation_data=(x_test, x_test),
callbacks=[TensorBoard(log_dir='./tmp/autoencoder')])
decoded_imgs = autoencoder.predict(x_test)
plot_imgs_and_reconstructions(x_test, decoded_imgs, n=10)
评论列表
文章目录