Is it possible to add weights to every entry in the input for CrossEntropyLoss, using only python code while maintaining efficiency?
Alternatively, I looked at the underlying C code: ClassNLLCriterion.c  and it seems that it may be modified to make use of the class weights to do entry weighting. Is this feasible for running some experiments?
Thank you!