So here self.alpha = tensor([1., 1., 1., ..., 1., 1.] where the length equals to the number of classes. But after self.alpha.to(re_prediction_scores), actually it is still self.alpha, where all the elements are 1. So seems like the weighted CrossEntropyLoss doesn't have it's effect. Did I make it wrong?
Hello just a little question. I saw you almost implemented weighted CrossEntropyLoss for all models as this:
So here self.alpha =
tensor([1., 1., 1., ..., 1., 1.]
where the length equals to the number of classes. But afterself.alpha.to(re_prediction_scores)
, actually it is still self.alpha, where all the elements are 1. So seems like the weighted CrossEntropyLoss doesn't have it's effect. Did I make it wrong?