How to Build a Deep Learning Project——With Keras
How to Build a Deep Learning Project——With Keras Step One: Data reading For cifar10, this step is very easy, Keras has already packaged it and split it into training data and testing data. from keras . datasets import cifar10 , cifar100 ( x_train , y_train ) , ( x_test , y_test ) = cifar10 . load_data ( ) For our DIY datasets, we should read and save the pictures one by one. def get_data ( dir ) ''' Return two lists ''' images = [ ] labels = [ ] dir = 'D:/' images_files = os . listdir ( dir + '/images' ) labels_files = os . listdir ( dir + '/labels' ) for x in images_files : images . append (