rshrott commited on
Commit
80b9a7d
1 Parent(s): a9126ce

Update renovation.py

Browse files
Files changed (1) hide show
  1. renovation.py +6 -5
renovation.py CHANGED
@@ -86,11 +86,11 @@ class Renovations(datasets.GeneratorBasedBuilder):
86
 
87
  num_files = len(all_files_and_labels)
88
  if split == "train":
89
- all_files_and_labels = all_files_and_labels[:int(num_files*0.7)]
90
  elif split == "val":
91
- all_files_and_labels = all_files_and_labels[int(num_files*0.7):int(num_files*0.85)]
92
- else:
93
- all_files_and_labels = all_files_and_labels[int(num_files*0.85):]
94
 
95
  for idx, (file, label) in enumerate(all_files_and_labels):
96
  yield idx, {
@@ -98,6 +98,7 @@ class Renovations(datasets.GeneratorBasedBuilder):
98
  "image": file,
99
  "labels": label,
100
  }
101
-
 
102
 
103
 
 
86
 
87
  num_files = len(all_files_and_labels)
88
  if split == "train":
89
+ all_files_and_labels = all_files_and_labels[:int(num_files*0.9)]
90
  elif split == "val":
91
+ all_files_and_labels = all_files_and_labels[int(num_files*0.9):]
92
+ else: # "test" split
93
+ all_files_and_labels = all_files_and_labels[int(num_files*0.9):]
94
 
95
  for idx, (file, label) in enumerate(all_files_and_labels):
96
  yield idx, {
 
98
  "image": file,
99
  "labels": label,
100
  }
101
+
102
+
103
 
104