Skip to content
Snippets Groups Projects
Commit 76a04751 authored by François  LAURENT's avatar François LAURENT
Browse files

warning for infinite loop

parent 0c98393a
No related branches found
No related tags found
3 merge requests!9Set of commits to be tagged 0.16,!7Save larva_dataset file along with model files,!6sample_size argument and check_larva_dataset_hdf5 function
Pipeline #111178 passed
...@@ -202,7 +202,11 @@ class LarvaDataset: ...@@ -202,7 +202,11 @@ class LarvaDataset:
elif subset.startswith("test"): elif subset.startswith("test"):
dataset = self.test_set dataset = self.test_set
if nbatches == "all": if nbatches == "all":
nbatches = len(dataset) if isinstance(dataset, itertools.cycle):
logging.warning("drawing unlimited number of batches from circular dataset")
nbatches = np.inf
else:
nbatches = len(dataset)
try: try:
while 0 < nbatches: while 0 < nbatches:
nbatches -= 1 nbatches -= 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment