Can you explain the purpose of using a single image in confusion matrix?
MNIST has 10 classes so confusion matrix will be 10x10. By testing only one image, you get a single 1 in 10x10 of zeros. You cannot calculate recall, precision, f1, etc on such a matrix.