Strange things happened, look at the simple code:
       mask_miss = mask_miss.expand_as(sxing)             # type: torch.Tensor
       mask_miss[:, :, -2, :, :] = 1   

I want to reset a channel of mask_miss to 1, but whenever I did this, all the elements will become 1.
        print(torch.max(mask_miss), torch.min(mask_miss))

I print the range of mask_miss and I get tensor(1), tensor(1). If I change mask_miss[:, :, -2, :, :] = 0.5, I get tensor(0.5), tensor(0.5).