I created 2 masks of 2 images by pytorch,
self.img_m = self.mask * self.img_truth x = self.mask * self.img_m y = (1 - self.mask) * self.img_g[-1].detach()