Spaces:
Sleeping
Sleeping
mahmoud669
commited on
Update scrub.py
Browse files
scrub.py
CHANGED
@@ -57,7 +57,7 @@ reversed_map = {
|
|
57 |
|
58 |
class CustomDataset(Dataset):
|
59 |
|
60 |
-
def __init__(self,
|
61 |
|
62 |
self.transformations = transformations
|
63 |
self.im_paths = [im_path for im_path in sorted(glob(f"{root}/*/*"))]
|
@@ -111,7 +111,7 @@ class SingleCelebCustomDataset(Dataset):
|
|
111 |
return im, gt
|
112 |
|
113 |
|
114 |
-
def get_dls(root,
|
115 |
if single:
|
116 |
ds = SingleCelebCustomDataset(root = root, forget_class=forget_class, transformations = transformations)
|
117 |
else:
|
|
|
57 |
|
58 |
class CustomDataset(Dataset):
|
59 |
|
60 |
+
def __init__(self,root,forget_class=16, transformations = None):
|
61 |
|
62 |
self.transformations = transformations
|
63 |
self.im_paths = [im_path for im_path in sorted(glob(f"{root}/*/*"))]
|
|
|
111 |
return im, gt
|
112 |
|
113 |
|
114 |
+
def get_dls(root, transformations, bs, forget_class=16, split = [0.9, 0.05, 0.05], ns = 4, single=False):
|
115 |
if single:
|
116 |
ds = SingleCelebCustomDataset(root = root, forget_class=forget_class, transformations = transformations)
|
117 |
else:
|