Created
September 20, 2020 15:16
-
-
Save RITIK-12/3fccc0dae3eb787604da6d34f69003e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# training the head of the network | |
H = model.fit( | |
aug.flow(trainX, trainY, batch_size=BS), | |
steps_per_epoch=len(trainX) // BS, | |
validation_data=(testX, testY), | |
validation_steps=len(testX) // BS, | |
epochs=EPOCHS) | |
# making predictions on the testing set | |
predIdxs = model.predict(testX, batch_size=BS) | |
# for each image in the testing set we need to find the index of the label with corresponding largest predicted probability | |
predIdxs = np.argmax(predIdxs, axis=1) | |
# Creating a classification report | |
print(classification_report(testY.argmax(axis=1), predIdxs, | |
target_names=lb.classes_)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment