From 5fff341e53b312b6c9a2471b9a89a67928ad367f Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 30 Apr 2019 18:19:46 +0200 Subject: [PATCH] Ensure the np.save function only gets a NumpyArray Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 8a9cd59..891db09 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -197,7 +197,7 @@ def _predict_one_epoch(dataset: tf.data.Dataset, filename = f"{output_file}-{counter:d}.npy" with open(filename, 'wb') as file: - np.save(file, decoded_predictions_batch, allow_pickle=False, fix_imports=False) + np.save(file, np.array(decoded_predictions_batch), allow_pickle=False, fix_imports=False) counter += 1