or you can simply put list of titles on the top of grid:
def show(inp, label):
    fig = plt.gcf()
    plt.imshow(inp.permute(1,2,0))
    plt.title(label)

grid = torchvision.utils.make_grid(batch_inputs)
labels = torch.tensor([0,1,0,0])
show(grid, label=[int(labels[x]) for x in range(len(labels))])