Yes I know there is some issue which I resolved it using squeeze operation. Below is the entire code for training that I am using.
for epoch in range(num_epochs):
    train_loss = 0
    val_loss = 0
    train_acc = 0
    val_acc = 0
    for images,labels in train_loader:
        images = images.to(dev)
        labels = labels.to(dev)

        outputs = model(images)
        loss = criterion(outputs, labels.type(torch.FloatTensor).to(dev))
        train_loss += loss.item()

        optimizer.zero_grad()
        loss.backward()
        optimizer.step()


        total = labels.size(0)
        _, predicted = torch.max(outputs.data, 1)
        labels = torch.squeeze(labels)
        correct = (predicted == labels).sum().item()
        train_acc += correct / total
    else:
        with torch.no_grad():
            model.eval()
            for images,labels in val_loader:
                images = images.to(dev)
                labels = labels.to(dev)

                val_out = model(images)
                loss = criterion(val_out, labels.type(torch.FloatTensor).to(dev))
                val_loss += loss.item()

                total = labels.size(0)
                labels = torch.squeeze(labels)
                _, predicted = torch.max(val_out.data, 1)
                correct = (predicted == labels).sum().item()
                val_acc += correct / total
        model.train()

    print("Epoch: {}/{}.. ".format(epoch, num_epochs),
              "Training Loss: {:.3f}.. ".format(train_loss/len(train_loader)),
              "Validation Loss: {:.3f}.. ".format(val_loss/len(val_loader)),
              "Training Accuracy: {: .3f}.. ".format(train_acc/len(train_loader)*100),
              "Validation Accuracy: {:.3f}".format(val_acc/len(val_loader)*100))

    train_losses.append(train_loss/len(train_loader))
    val_losses.append(val_loss/len(val_loader))
    train_accs.append(train_acc/len(train_loader)*100)
    val_accs.append(val_acc/len(val_loader)*100)
                                                                                                                                     


I am not sure but is that the resize is not working?