普通に画像を表示させるだけであれば、下記で表示出来る。
import matplotlib.pyplot as plt
plt.imshow(decoded_img[0].reshape(28, 28))
下記の表記でサイズが 20, 5 の新規領域を作り、(2, 10, i+1) で、2行10列ごとにサブプロットで領域を分割している?
n = 10
plt.figure(figsize=(20, 5))
for i in range(n):
ax = plt.subplot(2, 10, i+1)
plt.imshow(x_test[i].reshape(28, 28))
plt.gray()
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
ax = plt.subplot(2, 10, i+1+n)
plt.imshow(decoded_img[i].reshape(28, 28))
plt.gray()
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
plt.show()