![]() Image_path = os.path.join(IMAGE_DIRECTORY, dirname, image_name) ![]() If name = 'object': return np.array()Įlif name = 'none' : return np.array()ĭirectories = next(os.walk(IMAGE_DIRECTORY))įile_names = next(os.walk(os.path.join(IMAGE_DIRECTORY, dirname))) Here is my simple training code that loads the dataset and tries training/fitting the model: from keras.models import Sequential, load_modelįrom keras.layers import Dense, Dropout, Flattenįrom keras.layers import Conv2D, MaxPooling2Dįrom keras.layers import BatchNormalizationįrom keras.callbacks import ModelCheckpointįrom import ImageDataGeneratorįrom keras.models import Sequential, Modelįrom sklearn.model_selection import train_test_split I used this dataset and the training code before, so not sure what is causing the problem now. The detected shape was (21527, 300, 300) + inhomogeneous part. ![]() The requested array has an inhomogeneous shape after 3 dimensions. ValueError: setting an array element with a sequence. Training_images = np.array( for i in training_data]) But when I run the training code, it throws this error: Traceback (most recent call last): I'm trying to train a simple binary classification model using Keras and Tensorflow on a dataset of around 21,000 images.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |