Weighted cross entropy loss

I got training dataset 0 : 1 = 545 : 63 and validation dataset 11: 58.
if i do nn.CrossEntropy(weights=tensor([0.1036, 0.8964], device=‘cuda:0’)), is it okay? I want to do classification with deep learning… but I don’t know how to do with these dataset…please help me…

If your model is overfitting to the majority class, you could pass the weights as e.g. the inverse of the class counts. I’m not sure how the current weights were calculated, but you could check if it’s improving the training by checking the training and validation losses.