Skip to content
Snippets Groups Projects
Commit a3812701 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

improve logging of predict_bio

parent 0e818979
No related branches found
No related tags found
1 merge request!36Use bob.extension to load config files
Pipeline #
...@@ -42,6 +42,7 @@ class BioGenerator(object): ...@@ -42,6 +42,7 @@ class BioGenerator(object):
def __init__(self, database, biofiles, load_data=None, def __init__(self, database, biofiles, load_data=None,
biofile_to_label=None, multiple_samples=False): biofile_to_label=None, multiple_samples=False):
super(self, BioGenerator).__init__()
if load_data is None: if load_data is None:
def load_data(database, biofile): def load_data(database, biofile):
data = read_original_data( data = read_original_data(
...@@ -95,6 +96,9 @@ class BioGenerator(object): ...@@ -95,6 +96,9 @@ class BioGenerator(object):
def output_shapes(self): def output_shapes(self):
return self._output_shapes return self._output_shapes
def __len__(self):
return len(self.biofiles)
def __call__(self): def __call__(self):
"""A generator function that when called will return the samples. """A generator function that when called will return the samples.
......
...@@ -231,7 +231,8 @@ def main(argv=None): ...@@ -231,7 +231,8 @@ def main(argv=None):
checkpoint_path=checkpoint_path, checkpoint_path=checkpoint_path,
) )
logger.info("Saving the predictions in %s", output_dir) logger.info("Saving the predictions of %d files in %s", len(generator),
output_dir)
pool = Pool() pool = Pool()
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment