Thank you for reading my tutorial. Happy to help.
Look at the code where I reshaped the test dataset to 4-dims with the following code:
x_test = x_test.reshape(x_test.shape, 28, 28, 1)
Therefore, you need to reshape your dataset/image before calling the model.predict, with Numpy’s Reshape function.
Then, after making the prediction, you need to reduce it two 2-dims again to visualize it with something similar to the following code:
Hope this helps.