infocusp / tf_cnnvis

CNN visualization tool in TensorFlow
MIT License
780 stars 208 forks source link

AttributeError when running example 1 #48

Closed ZhengLyuFelix closed 6 years ago

ZhengLyuFelix commented 6 years ago

I got this error when running example 1:

     41         @ops.RegisterGradient("GuidedRelu")
     42         def _GuidedReluGrad(op, grad):
---> 43             return tf.where(0. < grad, gen_nn_ops._relu_grad(grad, op.outputs[0]), tf.zeros_like(grad))
     44 
     45         is_Registered = True

AttributeError: 'module' object has no attribute '_relu_grad'

Any idea why that happened? Thanks!

BhagyeshVikani commented 6 years ago

Hello @ZhengLyuFelix

Can you please share your TensorFlow version?

Dicksonchin93 commented 6 years ago

version 1.8.0

ZhengLyuFelix commented 6 years ago

Yes I'm using 1.8.0. It turned out to be the latest version of tensorflow should use the command format as: gen_nn_ops.relu_grad.

Thanks for the help and I'll close the issue.