Skip to content

Instantly share code, notes, and snippets.

@vivekpadia70
Last active April 1, 2020 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivekpadia70/8d7a8122b96b94f5880e87d7f865fa7f to your computer and use it in GitHub Desktop.
Save vivekpadia70/8d7a8122b96b94f5880e87d7f865fa7f to your computer and use it in GitHub Desktop.
(x_train,x_test)=imgs[(int)(0.1*len_data):],imgs[:(int)(0.1*len_data)]
x_train = x_train.astype('float32')/255
x_test = x_test.astype('float32')/255
train_len=len(x_train)
test_len=len(x_test)
(y_train,y_test)=labels[(int)(0.1*len_data):],labels[:(int)(0.1*len_data)]
num_classes=len(np.unique(labels))
Y_train=keras.utils.to_categorical(y_train,num_classes)
Y_test=keras.utils.to_categorical(y_test,num_classes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment