Ensure the np.save function only gets a NumpyArray

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-04-30 18:19:46 +02:00
parent a7a269ab73
commit 5fff341e53

View File

@ -197,7 +197,7 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
filename = f"{output_file}-{counter:d}.npy" filename = f"{output_file}-{counter:d}.npy"
with open(filename, 'wb') as file: 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 counter += 1