Switched output saving to numpy format

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-03-21 17:38:22 +01:00
parent 69cc07ed12
commit ae109fd131

View File

@ -154,12 +154,13 @@ def predict(dataset: tf.data.Dataset,
outputs = _predict_one_epoch(dataset, use_dropout, forward_passes_per_image, **checkpointables)
# save predictions
filename = 'ssd_predictions.bin'
filename = 'ssd_predictions.npy'
if use_dropout:
filename = 'dropout-' + filename
output_file = os.path.join(output_path, filename)
with open(output_path + filename, 'wb') as file:
pickle.dump(outputs, file)
with open(output_file, 'wb') as file:
np.save(file, outputs['decoded_predictions'], allow_pickle=False, fix_imports=False)
if verbose:
print((