This should work, but given that you are trying to plot a lot of subplots, you might want to increase the figure size etc.:
x = torch.randn(1000, 32, 32)
fig, axs = plt.subplots(20, 50)
for ax, x_ in zip(axs.flatten(), x):
    ax.imshow(x_)