Switched output saving to numpy format
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -154,12 +154,13 @@ def predict(dataset: tf.data.Dataset,
|
|||||||
outputs = _predict_one_epoch(dataset, use_dropout, forward_passes_per_image, **checkpointables)
|
outputs = _predict_one_epoch(dataset, use_dropout, forward_passes_per_image, **checkpointables)
|
||||||
|
|
||||||
# save predictions
|
# save predictions
|
||||||
filename = 'ssd_predictions.bin'
|
filename = 'ssd_predictions.npy'
|
||||||
if use_dropout:
|
if use_dropout:
|
||||||
filename = 'dropout-' + filename
|
filename = 'dropout-' + filename
|
||||||
|
output_file = os.path.join(output_path, filename)
|
||||||
|
|
||||||
with open(output_path + filename, 'wb') as file:
|
with open(output_file, 'wb') as file:
|
||||||
pickle.dump(outputs, file)
|
np.save(file, outputs['decoded_predictions'], allow_pickle=False, fix_imports=False)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print((
|
print((
|
||||||
|
|||||||
Reference in New Issue
Block a user