flip 2 tensor mask with Pythorch

Viewed 44

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()

enter image description here

The masks are the same size

I want to flip the 2 masks, to put the first mask on the second image, and to put the second mask on the first image?

Can I do that?

0 Answers
Related