How to set the weight of background class in cross_entropy?

Hi,
I noticed that the fasterrcnn loss uses cross_entropy loss without weight, in the meantime, the default value of box_positive_fraction in fasterrcnn is 0.25.
Does it mean, after training, the model would like to predict a background rather than a foreground target?
I get an unbalanced issue with my own dataset, so I want to set weights for each class.
How can I get a reasonable weight value for the background class?
Thanks for any advice!