Open doublezsx opened 6 years ago
Hi, I also met this problem, have you solved this? Could you please tell me how to solve it
Hi, same problem happening to me.
Hey, it can be solved following this - https://github.com/oarriaga/face_classification/issues/62 .
When run image_gradcam_demo.py, I got this problem: OSError: cannot identify image file '/Users/zhangyunlu/PycharmProjects/untitled28/face_classification-master/src/image_gradcam_demo.py'
please tell me what's wrong with that?
Traceback (most recent call last): File "D:/my_face/face_classification-master/src/image_gradcam_demo.py", line 74, in
predicted_class, 'conv2d_7')
File "D:\my_face\face_classification-master\src\utils\grad_cam.py", line 116, in compile_gradient_function
gradients = normalize(K.gradients(loss, conv_output)[0])
File "D:\my_face\face_classification-master\src\utils\grad_cam.py", line 31, in normalize
return x / (K.sqrt(K.mean(K.square(x))) + 1e-5)
File "C:\Program Files\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 1435, in square
return tf.square(x)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\ops\math_ops.py", line 470, in square
return gen_math_ops.square(x, name=name)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 8379, in square
"Square", x=x, name=name)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 528, in _apply_op_helper
(input_name, err))
ValueError: Tried to convert 'x' to a tensor and failed. Error: None values not supported.