Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # saving the filename array as .npy file
  2. np.save('filenames.npy', filenames)
  3.  
  4. import keras
  5. from keras.utils import to_categorical
  6.  
  7. # One hot vector representation of labels
  8. y_labels_one_hot = to_categorical(labels)
  9.  
  10. # saving the y_labels_one_hot array as a .npy file
  11. np.save('y_labels_one_hot.npy', y_labels_one_hot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement