For some reason, unknown to me now, at some point I switched the source of the CrossEntropyLoss weight vector.

originally: the 1/(class samples) for the entire training set
currently: the 1/(class samples) for the current minibatch

The current method has been working fine. And I can’t find any post online mentioning using the mini batch distribution. My back-justification thinking is that since the mini batches are randomly sampled, sometimes there are significant skews in the class distributions (this is objectively true for my dataset), and therefore I should “help” the criterion.
However, I wonder if it’s just overthinking the issue, or worse, leaving performance on the table.