File size: 221 Bytes
8cf4db8 |
1 2 3 4 5 6 7 8 |
import torchvision
totensor = torchvision.transforms.ToTensor()
def transform_augment_cd(img, min_max=(0, 1)):
img = totensor(img)
ret_img = img * (min_max[1] - min_max[0]) + min_max[0]
return ret_img |