Leyo commited on
Commit
081f072
·
1 Parent(s): adff023

fix test2 files path

Browse files
Files changed (1) hide show
  1. NLVR2.py +1 -4
NLVR2.py CHANGED
@@ -103,7 +103,7 @@ class NLVR2Dataset(datasets.GeneratorBasedBuilder):
103
  ),
104
  datasets.SplitGenerator(
105
  name=datasets.Split.TEST,
106
- gen_kwargs={"files_paths": [files_path[self.config.name]["test1"], files_path[self.config.name]["test1"]], "images_paths": [test1_img_path, test2_img_path], "split_name": "test"},
107
  ),
108
  ]
109
 
@@ -115,9 +115,6 @@ class NLVR2Dataset(datasets.GeneratorBasedBuilder):
115
  common_img_identifier = ex["identifier"].split("-")
116
  left_img_identifier = f"{common_img_identifier[0]}-{common_img_identifier[1]}-{common_img_identifier[2]}-img0.png"
117
  right_img_identifier = f"{common_img_identifier[0]}-{common_img_identifier[1]}-{common_img_identifier[2]}-img1.png"
118
- if i== 1:
119
- print(left_img_identifier)
120
- print(right_img_identifier)
121
  if split_name == "train":
122
  directory = str(ex["directory"])
123
  left_image_path = str(os.path.join(images_paths[i], directory, left_img_identifier))
 
103
  ),
104
  datasets.SplitGenerator(
105
  name=datasets.Split.TEST,
106
+ gen_kwargs={"files_paths": [files_path[self.config.name]["test1"], files_path[self.config.name]["test2"]], "images_paths": [test1_img_path, test2_img_path], "split_name": "test"},
107
  ),
108
  ]
109
 
 
115
  common_img_identifier = ex["identifier"].split("-")
116
  left_img_identifier = f"{common_img_identifier[0]}-{common_img_identifier[1]}-{common_img_identifier[2]}-img0.png"
117
  right_img_identifier = f"{common_img_identifier[0]}-{common_img_identifier[1]}-{common_img_identifier[2]}-img1.png"
 
 
 
118
  if split_name == "train":
119
  directory = str(ex["directory"])
120
  left_image_path = str(os.path.join(images_paths[i], directory, left_img_identifier))