OK, I see.
Can you describe what this output might refer to?
Failed to apply mask
Failed to apply mask
torch.Size([6, 3, 40, 40])
torch.Size([6, 3, 10, 10])
torch.Size([6, 256, 256])
torch.Size([6, 256, 256])
40
10

I.e. which size would correspond to noobj_mask and resized_mask?