Hi @ptrblck,
I achieved 84% accuracy in the final model with the unbalanced dataset. It’s a lot smaller than the value I got with the balanced dataset (93%), so I’m trying another oversampling strategy, however I’m having a problem. Since the function I am using to do oversampling is from another library, I have to make some modifications to the data and them to use the function, like this:

data, label = SMOTE().fit_sample(d2_train_data, dataset.train_labels)

where d2_train_data is the training data transformed into a 2D-array to use the SMOTE function.
Then I return the data to the original format and load the base using the Dataloader.

dataset.train_data = torch.from_numpy(dataset.train_data)
dataset.train_labels = torch.from_numpy(dataset.train_labels)
dataset = torch.utils.data.TensorDataset(dataset.train_data, dataset.train_labels)
loader = DataLoader( dataset=dataset, batch_size=64, shuffle=True)

However in the end is giving error related to the weights of the network.

RuntimeError: Given groups=1, weight[64, 3, 7, 7], so expected input[64, 32, 32, 3] to have 3 channels, but got 32 channels instead

I think it’s due to the transform that I can not use after this modification. Am I doing something wrong?