def METHOD_NAME(self, tensors, mask=None):
    image, affine_transforms = tensors
    batch_size, num_channels = K.shape(image)[0], K.shape(image)[3]
    affine_transforms = K.reshape(affine_transforms, (batch_size, 2, 3))
    grids = self._make_a_grid_per_batch(*self.output_size, batch_size)
    grids = K.batch_dot(affine_transforms, grids)
    interpolated_image = self._interpolate(image, grids, self.output_size)
    new_shape = (batch_size, *self.output_size, num_channels)
    interpolated_image = K.reshape(interpolated_image, new_shape)
    return interpolated_image