I believe this question should be closed:
It's impossible to answer it without looking at the code, so the only reasonable suggestion I can give to the OP is to add code. However, once code is added, the question will become off-topic here and on-topic for Stack Overflow. Right now is not on-topic for SO, so I cannot propose it for migration. What reason for closure should I select?
PS I believe this case is quite different from a preceding, superficially similar question I already asked here
for the following reasons:
as Nick Cox noted, the other question is so complicated that even on SO it will probably be off-topic (modeling & coding issues are too intertwined). The current question, on the other hand, asks about a well-known, completely solved problem: handwritten digit classification from the MNIST data set.
the other user was a beginner at her/his first question, and the question was not bad for a first time. Here the user is not an expert for sure, but he's not at his first question either, and the question lacks a lot to be desired, so it should be closed IMO.