I have build a CNN model for image classification. I want to pick five images that are correctly classified by the network and have the maximum softmax scores(for each class).
I have tried to check the model.evaluate(X_test,y_test) but it gives the overall softmax score of model.
model = Sequential()
model.add(Conv2D(96, (7, 7), kernel_initializer='he_uniform', padding='same',strides=2, input_shape=(32, 32, 3)))
model.add(Activation("relu"))
model.add(Conv2D(64, (5, 5), kernel_initializer='he_uniform', padding='same',strides=2))
model.add(Activation("relu"))
model.add(Conv2D(128, (3, 3), kernel_initializer='he_uniform', padding='same',strides=2))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(3, 3),padding='same',strides=3))
model.add(Flatten())
model.add(Dense(128))
model.add(Activation("relu"))
model.add(Dense(10, activation='softmax'))
compile model
opt = SGD(lr=0.0001, momentum=0.9)
model.compile(optimizer=opt, loss='categorical_crossentropy', metrics['accuracy'])
I want to see the softmax scores of correctly classified images.