Implementing autoencoders with TensorFlow