-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
I'm trying to replicate the tutorial
`model = tf.keras.applications.vgg16.VGG16(weights="imagenet", include_top=True)
img = tf.keras.preprocessing.image.load_img(IMAGE_PATH, target_size=(224, 224))
img = tf.keras.preprocessing.image.img_to_array(img)
data = ([img], None)
explainer = GradCAM()
grid = explainer.explain(data, model, class_index=281) # 281 is the tabby cat index in ImageNet
explainer.save(grid, ".", "grad_cam.png")`
it gives me an error
"AttributeError: 'Dense' object has no attribute 'output_shape'"
How can I fix it? Thank you
Metadata
Metadata
Assignees
Labels
No labels