I assume that you would like to visualize each of the 64 slices as a grayscale image?
If that’s the case, this code should work:
imgs = torch.randn(64, 21, 21)
imgs = torchvision.utils.make_grid(imgs.unsqueeze(1))
print(imgs.shape)
> torch.Size([3, 186, 186])

imgs = imgs.permute(1, 2, 0).numpy()
plt.imshow(imgs)