Issue
I have a model and I trained and saved it, now I just want to load it and then predict 1000 images file for me I load it by this code
loaded_model = tf.keras.models.load_model('dir')
and I use this code for predicting my data
loaded_model.predict(test_dataset)
this code gives me back a NumPy array, How can I get labels that predict in the model. prediction
as a text file.
Solution
You can map the string to numerals followed by joining into text
', '.join(list(array.astype(str).flatten()))
', '.join(array.astype(str).flatten().tolist()))
Answered By - Naga kiran
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.