If self.transform applies random transformations, both calls will use different random transformations, which will mess up the data to target correspondence.
In my example, I’ve used the functional API to only draw the random parameters once and apply them on the image as well as on the target.