I am trying to show an image from MNIST dataset. I found in Keras is like the following. How can I do it in Pytorch?
import matplotlib.pyplot as plt

%matplotlib inline # Only use this if using iPython
image_index = 7777 # You may select anything up to 60,000
print(y_train[image_index]) # The label is 8
plt.imshow(x_train[image_index], cmap='Greys')