criterion_CE = nn.CrossEntropyLoss(ignore_index=-1).cuda()
        labels1 = functional.interpolate(labels, size=24, mode='bilinear')
        loss1 = criterion_CE(attention1, torch.squeeze(labels1).long())

Here’s the way I caculate my final BCE loss. It seem that functional. interpolate turned the -1s into 0s. Does the functional. interpolate matter here?How could I avoid this?