Hi thank you for the suggestion. But this will cause size not matching issue. RuntimeError: The size of tensor a (64) must match the size of tensor b (10) at non-singleton dimension 3
Do you happen to know another way?
Thank you. There was a typo in my original post I have fixed.
My purpose is to fill in a batch of image x with to_learn when mask is 1. Suppose there is an image of a dog. The mask gives me a segment of the dog’s head. I want to fill in the head area with to_learn.
Using the suggested method will not fill in x with to_learn right?