Solved by KFrank in post #2 
              
              
                Hi Augustas! 

The short answer is yes, the mask should be 0s and 1s (and, yes, 
it does matter). 
Specifically, when you use pytorch’s BCEWithLogitsLoss (or its 
numerically-less-stable cousin BCELoss), the target (mask) you 
pass in should be a floating-point tensor of probabilities that range 
fr…