data shapes retrieval and hparam passing

This commit is contained in:
steffen
2020-04-17 18:07:04 +02:00
parent f51d73ce6d
commit f607324606
3 changed files with 15 additions and 8 deletions

View File

@ -15,6 +15,10 @@ class BinaryMasksDataset(Dataset):
_to_label['mask'] = V.MASK
settings = ['test', 'devel', 'train']
@property
def sample_shape(self):
return self[0][0].shape
def __init__(self, data_root, setting, transforms=None):
assert isinstance(setting, str), f'Setting has to be a string, but was: {self.settings}.'
assert setting in self.settings, f'Setting must match one of: {self.settings}.'