add the following code to your file to test the image and print the outputted label main py prediction sess run(tf argmax(output_layer )feed_dict={ [img]}print ("prediction for test image:"np squeeze(prediction)th np squeeze function is called on the prediction to return the single integer from the array ( to go from [ to the resulting output demonstrates that the network has recognized this image as the digit output prediction for test image you can try testing the network with more complex images -digits that look like other digitsfor exampleor digits that have been drawn poorly or incorrectly -to see how well it fares conclusion in this tutorial you successfully trained neural network to classify the mnist dataset with around accuracy and tested it on an image of your own current state-of-the-art research achieves around on this same problemusing more complex network architectures involving convolutional layers these use the structure of the image to better represent the contentsunlike our method which flattened all the pixels