Hi,
I am training a model on CIFAR10 dataset and for some reason, the weights don’t seem to change at all:
Epoch 0/24
----------
100%|██████████| 3125/3125 [00:11<00:00, 280.29it/s]
train Loss: 4.0429 Acc: 0.1667
100%|██████████| 3125/3125 [00:07<00:00, 413.33it/s]
val Loss: 4.0429 Acc: 0.1667

Epoch 1/24
----------
100%|██████████| 3125/3125 [00:10<00:00, 286.69it/s]
train Loss: 4.0429 Acc: 0.1667
100%|██████████| 3125/3125 [00:07<00:00, 411.33it/s]
val Loss: 4.0429 Acc: 0.1667

Epoch 2/24
----------
100%|██████████| 3125/3125 [00:11<00:00, 281.77it/s]
train Loss: 4.0429 Acc: 0.1667
100%|██████████| 3125/3125 [00:07<00:00, 414.74it/s]
val Loss: 4.0429 Acc: 0.1667

Epoch 3/24
----------
100%|██████████| 3125/3125 [00:11<00:00, 279.62it/s]
train Loss: 4.0429 Acc: 0.1667

This is how my model is training:
def train_model(model, criterion, optimizer, scheduler, num_epochs=25):
    # since = time.time()
    # best_model_wts = copy.deepcopy(model.state_dict())
    best_acc = 0.0
    for epoch in range(num_epochs):
        print('Epoch {}/{}'.format(epoch, num_epochs - 1))
        print('-' * 10)
        # Each epoch has a training and validation phase
        for phase in ['train', 'val']:
            if phase == 'train':
                model.train()  # Set model to training mode
            else:
                model.eval()   # Set model to evaluate mode
            running_loss = 0.0
            running_corrects = 0
            # Iterate over data.
            for inputs, labels in tqdm(training_loader):
                inputs = inputs.cuda()
                labels = labels.cuda()
                # zero the parameter gradients
                optimizer.zero_grad()
                with torch.set_grad_enabled(phase == 'train'):
                    outputs = model(inputs)
                    _, preds = torch.max(outputs, 1)
                    loss = criterion(outputs, labels)
                    # backward + optimize only if in training phase
                    if phase == 'train':
                        loss.backward()
                        optimizer.step()
                running_loss += loss.item() * inputs.size(0)
                running_corrects += torch.sum(preds == labels.data)
            if phase == 'train':
                scheduler.step()
            epoch_loss = running_loss / 30000
            epoch_acc = running_corrects.double() / 30000
            print('{} Loss: {:.4f} Acc: {:.4f}'.format(
                phase, epoch_loss, epoch_acc))
        print()
    return model 

I have tried different learning rates, different optimisers, and everything but nothing seems to work. What am I doing wrong?