Defining class weights for BCE with multi-channel gaussian masks

How to define class weights for multiclass BINARY_CROSS_ENTROPY_WITH_LOGITS with gaussian masks as targets?

anyone? like to know tips if this is possible.

Have a look at this article, I hope it will help and can be adapted to your use-case.