Issue
I am trying to save a series of images to CSV file so they can be used as a training dataset for Alexnet Keras machine learning. The shape is (15,224,224,3).
So far I am having issue doing this. I have managed to put all data into a numpy array but now I cannot save it to a file.
Please help.
Solution
I don't think saving it to a csv file is the correct way to do this, it's used for 1d or 2d data to create a table-like structure, so I'm going to offer another solution. You can use np.save
to save any numpy array to a file;
np.save('file_name', your_array)
which can then be loaded using np.load
;
loaded_array = np.load('file_name.npy')
Hope that this works for you.
Answered By - dennissv
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.