Created
June 6, 2022 16:27
-
-
Save poojatambe/9d67b88f8541fe845c1f1a39a4cd5136 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
#load weights of the trained model. | |
input_shape = (224, 224, 3) | |
optim_1 = Adam(learning_rate=0.0001) | |
n_classes=6 | |
vgg_model = model(input_shape, n_classes, optim_1, fine_tune=2) | |
vgg_model.load_weights('/content/drive/MyDrive/vgg/tune_model19.weights.best.hdf5') | |
# prediction on model | |
vgg_preds = vgg_model.predict(img) | |
vgg_pred_classes = np.argmax(vgg_preds, axis=1) | |
c2.header('Output') | |
c2.subheader('Predicted class :') | |
c2.write(classes[vgg_pred_classes[0]] ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment