Thanks! Is there anything else I can do to prevent overfitting? I implemented the WeightedRandomSampler as well and now the loss is strictly decreasing for the first 10 epochs but then it always starts to overfit (also without using data augmentation). I am using a pretrained ResNet18 and also tried to freeze all except the last layer.