Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # saving the filename array as .npy file
- np.save('filenames.npy', filenames)
- import keras
- from keras.utils import to_categorical
- # One hot vector representation of labels
- y_labels_one_hot = to_categorical(labels)
- # saving the y_labels_one_hot array as a .npy file
- np.save('y_labels_one_hot.npy', y_labels_one_hot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement