def __call__(self, *inputs): zx = th_random_choice(self.values, p=self.p) zy = th_random_choice(self.values, p=self.p) if self.lazy: return Zoom([zx, zy], lazy=True)(inputs[0]) else: outputs = Zoom([zx, zy], interp=self.interp)(*inputs) return outputs
def __call__(self, *inputs): random_height = th_random_choice(self.values, p=self.p) random_width = th_random_choice(self.values, p=self.p) if self.lazy: return Translate([random_height, random_width], lazy=True)(inputs[0]) else: outputs = Translate([random_height, random_width], interp=self.interp)(*inputs) return outputs
def __call__(self, *inputs): shear = th_random_choice(self.values, p=self.p) if self.lazy: return Shear(shear, lazy=True)(inputs[0]) else: outputs = Shear(shear, interp=self.interp)(*inputs) return outputs
def __call__(self, *inputs): degree = th_random_choice(self.values, p=self.p) if self.lazy: return Rotate(degree, lazy=True)(inputs[0]) else: outputs = Rotate(degree, interp=self.interp)(*inputs) return outputs