Hi folks,
I am meeting one question when comparing the model performances between class-balance and instance-balance. Since the dataset is a little bit skewed, a class has way imbalanced and few samples than others. How can I set the weights to make sure at least one sample of this few-shot class can be batched each time while maintaining the other heavy classes still dominate the quantity in each batch.
In other words, some batches have 0 entities for this few-shot class that makes the loss computes as nan.
Thank you in advance.