在对x_test训练后,得到的是三维的图片,现在想reshape,需要用到numpy, import numpy as np x_test1 = np.arrray(x_test) #输出图片样式 plt.imshow(x_test1,reshape(28,28))