Keras-vis: 'GradCAM' is not defined
mubeenmeo344 opened this issue · 2 comments
mubeenmeo344 commented
NameError Traceback (most recent call last)
in ()
9
10 # Start explainer
---> 11 explainer = GradCAM()
12 grid = explainer.explain(data, model, class_index=281) # 281 is the tabby cat index in ImageNet
13
NameError: name 'GradCAM' is not defined
Where is this (GradCAM()) method or class exists, why it's giving error.
RaphaelMeudec commented
Can you provide the full code to reproduce the error? In particular, the import lines. Thanks
mubeenmeo344 commented
I have solved this problem by importing class GRADCAM() from this file:
"https://github.com/sicara/tf-explain/blob/master/tf_explain/core/grad_cam.py"