Spaces:
Runtime error
Runtime error
File size: 377 Bytes
4d1ebf3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import torchvision.transforms as transforms
im_mean = (124, 116, 104)
im_normalization = transforms.Normalize(
mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]
)
inv_im_trans = transforms.Normalize(
mean=[-0.485/0.229, -0.456/0.224, -0.406/0.225],
std=[1/0.229, 1/0.224, 1/0.225])
|