def conv_autoencode_cifar():
(x_train, y_train), (x_test, y_test) = load_cifar(flatten=False)
autoencoder = build_conv_autoencoder(input_dim=(32,32,3))
autoencoder.summary()
autoencoder.fit(x_train, x_train,
epochs=25,
batch_size=64,
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, shape=(32,32,3))
评论列表
文章目录