Increasing the size of images displayed in Pytorch
I want to display few images and their respective labels using Pytorch dataloader. 

However the image displayed is very tiny grid. 

How do I increase the width of each image so it's bigger. 

Here's the code I used: 

mean_nums = [0.485, 0.456, 0.406]
std_nums = [0.229, 0.224, 0.225]

def imshow(inp, title=None):
    """Imshow for Tensor."""
    inp = inp.numpy().transpose((1, 2, 0))
    mean = np.array(mean_nums)
    std = np.array(std_nums)
    inp = std * inp + mean
    inp = np.clip(inp, 0, 1)
    plt.imshow(inp)
    if title is not None:
        plt.title(title)
    plt.pause(0.001)  # pause a bit so that plots are updated


# Get a batch of training data
inputs, classes = next(iter(dataloaders['trainLoader']))

# Make a grid from batch
out = torchvision.utils.make_grid(inputs,nrow=2)

imshow(out, title=[image_datasets['train'].classes[x] for x in classes])




Try to insert plt.figure(figsize=[width, height]) before plt.imshow And choose the width, height  that will satisfy you.

So, for example, the imshow function may be:

def imshow(inp, title=None):
    """Imshow for Tensor."""
    inp = inp.numpy().transpose((1, 2, 0))
    mean = np.array(mean_nums)
    std = np.array(std_nums)
    inp = std * inp + mean
    inp = np.clip(inp, 0, 1)
    plt.figure(figsize=[20, 20])
    plt.imshow(inp)
    if title is not None:
        plt.title(title)
    plt.pause(0.001)  # pause a bit so that plots are updated

