Hello. I’d like to plot a grid of images with the following code:
CHSC = torch.load('calibratedHsCube.pt') masks = torch.load('mask.pt') rgb_CHSC = CHSC[:, :, :, (66, 23, 8)] rgb_CHSC = rgb_CHSC.permute(0, 3, 1, 2) fig = plt.figure(figsize=(15, 15)) grid_img = torchvision.utils.make_grid(rgb_CHSC, nrow=19) grid_img = grid_img.permute(1, 2, 0) plt.imshow(grid_img.detach().numpy())
The code seems to work but I cannot see any figure. Any suggestion?
Also I used this:
import matplotlib from matplotlib.figure import Figure from matplotlib import pyplot as plt matplotlib.use('TkAgg')