Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Break up single sentence wall of text into multiple sentences and paragraphs. Added language to code, in the event that highlighting is ever enabled here. Also a small spelling and grammar correction.
Source Link

hello I am trying to do multi class(16) classification  ,however however no matter what parameters or numnumber of layers I use my accuracy is not improving, its in 30s the max iI got was 43,I.

I have tried early stopping to red overfilling but my testing accuracy is still low ,I.

I have 750 images in training and 350 in testing. I am also getting high traning accuracy vs low validation accuracy.

features_train=features_train/255
features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)

hello I am trying to do multi class(16) classification  ,however no matter what parameters or num of layers I use my accuracy is not improving its in 30s the max i got was 43,I have tried early stopping to red overfilling but my testing accuracy is still low ,I have 750 images in training and 350 in testing. I am also getting high traning accuracy vs low validation accuracy

features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)

I am trying to do multi class(16) classification, however no matter what parameters or number of layers I use my accuracy is not improving, its in 30s the max I got was 43.

I have tried early stopping to red overfilling but my testing accuracy is still low.

I have 750 images in training and 350 in testing. I am also getting high traning accuracy vs low validation accuracy.

features_train=features_train/255
features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)
added 66 characters in body
Source Link

hello I am trying to do multi class(16) classification ,however no matter what parameters or num of layers I use my accuracy is not improving its in 30s the max i got was 43,I have tried early stopping to red overfilling but my testing accuracy is still low ,I have 750 images in training and 350 in testing. I am also getting high traning accuracy vs low validation accuracy

features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)

hello I am trying to do multi class(16) classification ,however no matter what parameters or num of layers I use my accuracy is not improving its in 30s the max i got was 43,I have tried early stopping to red overfilling but my testing accuracy is still low ,I have 750 images in training and 350 in testing.

features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)

hello I am trying to do multi class(16) classification ,however no matter what parameters or num of layers I use my accuracy is not improving its in 30s the max i got was 43,I have tried early stopping to red overfilling but my testing accuracy is still low ,I have 750 images in training and 350 in testing. I am also getting high traning accuracy vs low validation accuracy

features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)
Source Link

keras model accuracy not improving

hello I am trying to do multi class(16) classification ,however no matter what parameters or num of layers I use my accuracy is not improving its in 30s the max i got was 43,I have tried early stopping to red overfilling but my testing accuracy is still low ,I have 750 images in training and 350 in testing.

features_test=features_test/255

cnn = models.Sequential([
    layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu',  strides=(2, 2), padding="same", input_shape=(224, 224, 3)),

    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(32 ,(3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(64, (3, 3), activation='relu'),
    layers.MaxPooling2D((2,2)),
    layers.Dropout(0.25),
    layers.Conv2D(128, (3, 3), activation='relu'),
 
    layers.MaxPooling2D((2,2)),
    
    
    layers.Flatten(),
    layers.Dense(64,activation='relu'),
    layers.Dense(16, activation='softmax')
])
cnn.compile(optimizer='adam',
             loss='categorical_crossentropy',
             metrics=['accuracy'])
cnn.fit(features_train,labels_train,epochs=20, batch_size = 4 ,validation_split = 0.25)