Alternated the mode in mnist example to CPU.