Added sorting of files after glob to ensure expected order

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2019-07-15 14:29:12 +02:00
parent 4f4ff42d61
commit c56440cb49
1 changed files with 2 additions and 0 deletions

View File

@ -399,6 +399,7 @@ def _ssd_evaluate_unbatch_dict(glob_string: str) -> tuple:
unbatched_dict = None
files = glob.glob(glob_string)
files.sort()
nr_keys = None
for filename in files:
with open(filename, "rb") as file:
@ -422,6 +423,7 @@ def _ssd_evaluate_unbatch_list(glob_string: str) -> List[np.ndarray]:
unbatched = []
files = glob.glob(glob_string)
files.sort()
for filename in files:
with open(filename, "rb") as file:
batched = pickle.load(file)