The original instructions are mentioned on https://www.tensorflow.org/get_started/mnist/pros It is inherently strange that the entire source code is not attached over there at the time of writing this. Pieces of the entire source scattered with explanation makes for a good tutorial but a bad idea for actually implementing it so that it "just works".