Converting PyTorch MNIST Example to TensorFlow

Original Code

Converted Code