|
|
|
import torch |
|
import albumentations as A |
|
from albumentations.pytorch import ToTensorV2 |
|
|
|
|
|
|
|
train_set_transforms = { |
|
'randomcrop': A.RandomCrop(height=32, width=32, p=0.2), |
|
'horizontalflip': A.HorizontalFlip(), |
|
'cutout': A.CoarseDropout(max_holes=1, max_height=16, max_width=16, min_holes=1, min_height=1, min_width=1, fill_value=[0.49139968*255, 0.48215827*255 ,0.44653124*255], mask_fill_value=None), |
|
'normalize': A.Normalize((0.49139968, 0.48215827, 0.44653124), (0.24703233, 0.24348505, 0.26158768)), |
|
'standardize': ToTensorV2(), |
|
} |
|
|
|
|
|
test_set_transforms = { |
|
'normalize': A.Normalize((0.49139968, 0.48215827, 0.44653124), (0.24703233, 0.24348505, 0.26158768)), |
|
'standardize': ToTensorV2() |
|
} |