diff --git a/pygmtools/benchmark.py b/pygmtools/benchmark.py index 0d826e6..b0c78fd 100644 --- a/pygmtools/benchmark.py +++ b/pygmtools/benchmark.py @@ -59,7 +59,7 @@ def __init__(self, name, sets, obj_resize=(256, 256), problem='2GM', filter='int data_set = eval(self.name)(self.sets, self.obj_resize, **args) suffix = data_set.suffix self.data_path = os.path.join(data_set.dataset_dir, 'data-' + str(self.obj_resize) + '-' + suffix + '.json') - self.data_list_path = os.path.join(data_set.dataset_dir, sets + '.json') + self.data_list_path = os.path.join(data_set.dataset_dir, sets + '-' + suffix + '.json') self.classes = data_set.classes with open(self.data_path) as f: diff --git a/pygmtools/dataset.py b/pygmtools/dataset.py index d9011c5..0ad3499 100644 --- a/pygmtools/dataset.py +++ b/pygmtools/dataset.py @@ -310,8 +310,8 @@ def process(self): Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for training set, and ``test.json`` for testing set. """ - train_file = os.path.join(self.dataset_dir, 'train.json') - test_file = os.path.join(self.dataset_dir, 'test.json') + train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json') + test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json') img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json') if not (os.path.exists(train_file) and os.path.exists(test_file) and os.path.exists(img_file)): if not (os.path.exists(train_file) and os.path.exists(test_file)): @@ -564,8 +564,8 @@ def process(self): Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for training set, and ``test.json`` for testing set. """ - train_file = os.path.join(self.dataset_dir, 'train.json') - test_file = os.path.join(self.dataset_dir, 'test.json') + train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json') + test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json') img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json') data_list = [] @@ -850,8 +850,8 @@ def process(self): Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for training set, and ``test.json`` for testing set. """ - train_file = os.path.join(self.dataset_dir, 'train.json') - test_file = os.path.join(self.dataset_dir, 'test.json') + train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json') + test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json') img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json') if (not os.path.exists(train_file)) or (not os.path.exists(test_file)) or (not os.path.exists(img_file)): train_list = [] @@ -1104,7 +1104,7 @@ def process(self): Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for training set, and ``test.json`` for testing set. """ - set_file = os.path.join(self.dataset_dir, self.sets + '.json') + set_file = os.path.join(self.dataset_dir, self.sets + '-' + self.suffix + '.json') img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json') if not os.path.exists(set_file): @@ -1301,7 +1301,7 @@ def process(self): Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for training set, and ``test.json`` for testing set. """ - set_file = os.path.join(self.dataset_dir, self.sets + '.json') + set_file = os.path.join(self.dataset_dir, self.sets + '-' + self.suffix + '.json') img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json') if not os.path.exists(set_file):