Skip to content

Commit

Permalink
Merge branch '20-check_tfrecords_files' into 'develop'
Browse files Browse the repository at this point in the history
Resolve "Add warning message when no output_shape or output_type is missing"

Closes #20

See merge request remi.cresson/otbtf!56
  • Loading branch information
Cresson Remi committed Sep 14, 2022
2 parents ec411ef + b5eb853 commit 2d8a792
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions otbtf/tfrecords.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def read(self, batch_size, target_keys, n_workers=1, drop_remainder=True, shuffl
:param num_parallel_calls: number of parallel calls for the parsing + preprocessing step
:param kwargs: some keywords arguments for preprocessing_fn
"""
for dic, file in zip([self.output_types, self.output_shapes], [self.output_types_file, self.output_shapes_file]):
assert dic, f"The file {file} is missing!"

options = tf.data.Options()
if shuffle_buffer_size:
options.experimental_deterministic = False # disable order, increase speed
Expand Down

0 comments on commit 2d8a792

Please sign in to comment.