Closed jjaacckkyy63 closed 6 years ago
Hi @jjaacckkyy63,
The gb
shape should be (1, 224, 224, 3)
and you are getting (1, 3, 224, 224)
. Are you using theano backend? This line can be fixed by changing gradcam[..., np.newaxis] to gradcam[np.newaxis, ...], but you will need to correct shapes in other places too.
Hi, but I was using tensorflow as backend Is there a problem about my keras version. I have updated it recently
May I ask you about all the package version when you developing it including like opencv ?
I ran it with the latest conda packages yesterday. tensorflow 1.3.0 keras 2.0.5 opencv 3.1.0
Hi, I am using tutorial as a practice but when i ran the command python grad_cam.py cat_dog.png I got the error that didn't occur to me last time I ran it
Model prediction: boxer (242) with probability 0.420 bull_mastiff (243) with probability 0.282 tiger_cat (282) with probability 0.053 tiger (292) with probability 0.050 Great_Dane (246) with probability 0.050 Explanation for 'boxer'
ValueError Traceback (most recent call last)