Skip to content

Commit

Permalink
generator inputs/outputs not-list assertion message
Browse files Browse the repository at this point in the history
  • Loading branch information
subpic committed Feb 19, 2020
1 parent ad7bd3f commit 5fbfb6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generators.py
Expand Up @@ -81,7 +81,7 @@ def on_epoch_end(self):
def _read_data(self, ids_batch, accessor):
X = []
if accessor:
assert isinstance(accessor, (tuple, list)) or callable(accessor)
assert isinstance(accessor, (tuple, list)) or callable(accessor), 'Generator inputs/outputs must be of type list, tuple, or function'

if callable(accessor):
X = accessor(ids_batch)
Expand All @@ -104,7 +104,7 @@ def _data_generation(self, ids_batch):
y = self._read_data(ids_batch, params.outputs)
X_list = self._read_data(ids_batch, params.inputs_df)

assert isinstance(params.inputs, (tuple, list))
assert isinstance(params.inputs, (tuple, list)), 'Generator inputs/outputs must be of type list or tuple'

for input_name in params.inputs:
data = []
Expand Down Expand Up @@ -198,7 +198,7 @@ def _data_generation(self, ids_batch):
y = self._read_data(ids_batch, params.outputs)
X_list = self._read_data(ids_batch, params.inputs_df)

assert isinstance(params.inputs, (tuple, list))
assert isinstance(params.inputs, (tuple, list)), 'Generator inputs/outputs must be of type list or tuple'

if params.data_path:
with H5Helper(params.data_path, file_mode='r',
Expand Down

0 comments on commit 5fbfb6b

Please sign in to comment.