Thanks Arunava,But what i did the same,i am getting size mismatch error.
my code:
def show_batch_images(dataloader,model):
    images, labels = next(iter(dataloader))
    print(labels)
    out = model.features(images)
    out_class = model.classifier(out)
    out_class1 = model.classifier1(out)
    _,pred1 = torch.max(out_class.data,1)
    _, pred2 = torch.max(out_class1.data ,1)
    img = torchvision.utils.make_grid(images)
return image,pred1,pred2