Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -6,6 +6,9 @@ from torchvision import transforms
|
|
6 |
import torchvision
|
7 |
import numpy as np
|
8 |
import cv2
|
|
|
|
|
|
|
9 |
|
10 |
cv2.setNumThreads(0)
|
11 |
cv2.ocl.setUseOpenCL(False)
|
@@ -24,15 +27,6 @@ class Cifar10SearchDataset(torchvision.datasets.CIFAR10):
|
|
24 |
|
25 |
return image, label
|
26 |
|
27 |
-
import albumentations as A
|
28 |
-
from albumentations.pytorch.transforms import ToTensorV2
|
29 |
-
|
30 |
-
import numpy as np
|
31 |
-
import cv2
|
32 |
-
|
33 |
-
cv2.setNumThreads(0)
|
34 |
-
cv2.ocl.setUseOpenCL(False)
|
35 |
-
|
36 |
def augmentation_custom_resnet(data, mu=(0.49139968, 0.48215827, 0.44653124), sigma=(0.24703233, 0.24348505, 0.26158768), pad=4):
|
37 |
|
38 |
if data == 'Train':
|
|
|
6 |
import torchvision
|
7 |
import numpy as np
|
8 |
import cv2
|
9 |
+
import albumentations as A
|
10 |
+
from albumentations.pytorch.transforms import ToTensorV2
|
11 |
+
|
12 |
|
13 |
cv2.setNumThreads(0)
|
14 |
cv2.ocl.setUseOpenCL(False)
|
|
|
27 |
|
28 |
return image, label
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
def augmentation_custom_resnet(data, mu=(0.49139968, 0.48215827, 0.44653124), sigma=(0.24703233, 0.24348505, 0.26158768), pad=4):
|
31 |
|
32 |
if data == 'Train':
|