Autoencoder
Intro
The purpose of autoencoder is compress data,but the compress effect is worse than .jpeg,mp3 or other video compress format, and it can not compress dataset. It often use to denoise image or dimensionality reduction.
Example
There will show two example of Autoencoder:
Simple Autoencoder:
compress a image to a narrow vector, and reconstruct it,the network has encoder, hidden layer and a decoder.

Convolutional Autoencoder
The encoder part of the network will be a typical convolutional pyramid. Each convolutional layer will be followed by a max-pooling layer to reduce the dimensions of the layers. The decoder though might be something new to you. The decoder needs to convert from a narrow representation to a wide reconstructed image. For example, the representation could be a 4x4x8 max-pool layer. This is the output of the encoder, but also the input to the decoder. We want to get a 28x28x1 image out from the decoder so we need to work our way back up from the narrow decoder input layer. A schematic of the network is shown below.

you will see there use a api tf.image.resize_nearest_neighbor, this api use to upsampling a small image to a large one .In this Distill article from Augustus Odena, et al, the authors show that these checkerboard artifacts can be avoided by resizing the layers using nearest neighbor or bilinear interpolation (upsampling) followed by a convolutional layer.
