From f85ddbc070c8e6bf7893e087f37d4fa0acb2dc18 Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Wed, 12 Aug 2020 17:32:10 +0200 Subject: [PATCH] Changed logic in keyword argument parser --- pysegcnn/core/dataset.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pysegcnn/core/dataset.py b/pysegcnn/core/dataset.py index ee36ba3..1e422f1 100644 --- a/pysegcnn/core/dataset.py +++ b/pysegcnn/core/dataset.py @@ -50,6 +50,10 @@ class ImageDataset(Dataset): # whether to chronologically sort the samples 'sort': False, + # the random seed used to split dataset into training, validation and + # test data + 'seed': 0, + # the transformations to apply to the original image # artificially increases the training data size 'transforms': [], @@ -93,7 +97,7 @@ class ImageDataset(Dataset): def _init_kwargs(self, **kwargs): # check if the keyword arguments are correctly specified - if not set(self.default_kwargs.keys()).issubset(kwargs.keys()): + if not set(kwargs.keys()).issubset(self.default_kwargs.keys()): raise TypeError('Valid keyword arguments are: \n' + '\n'.join('- {}'.format(k) for k in self.default_kwargs.keys())) @@ -704,7 +708,8 @@ if __name__ == '__main__': transforms=[], gt_pattern='*mask.png', pad=True, - cval=99) + cval=99, + ) # instanciate the ProSnow datasets # garmisch = ProSnowGarmisch(os.path.join(prosnow_path, 'Garmisch'), -- GitLab