Imported from https://github.com/Lornatang/TensorFlow-MNIST