question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'tensorflow.python.ops.gen_nn_ops' has no attribute '_relu_grad'

See original GitHub issue

Currently, I’m using tensorflow 1.8. When I run the example code with the deconv_visualization() function.

It returns error:

  File "/Yang/project/detection/code/tf18/third_party/tf_cnnvis/tf_cnnvis/tf_cnnvis.py", line 43, in _GuidedReluGrad
    return tf.where(0. < grad, gen_nn_ops._relu_grad(grad, op.outputs[0]), tf.zeros_like(grad))
AttributeError: module 'tensorflow.python.ops.gen_nn_ops' has no attribute '_relu_grad'

Do you have any idea about that. I’m really appreciate that!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
tengeryecommented, Jun 14, 2018

I successfully fix it. According to this post, change _relu_grad to relu_grad. @foreverYoungGitHub @ggaziv

0reactions
BhagyeshVikanicommented, Jun 24, 2018

Thanks @tengerye Closing this now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'tensorflow' has no attribute 'python'
python module after importing everything from it. The reason for that is to provide access to the submodules contained in the python package...
Read more >
AttributeError: module 'tensorflow.python.keras.utils' has no ...
As it already has been said, to_categorical() is function. It in keras for tensorflow 2.x can be imported this way: from keras.utils import...
Read more >
Tensorflow running error - General Discussion
AttributeError : module 'tensorflow.core.framework.types_pb2 this error giving when i was executing code please help me.
Read more >
AttributeError: module 'tensorflow.python.framework.ops' has ...
I ran into Attribute Error when I used the Keras library in this way. But don't let that scare you. The solution is...
Read more >
AttributeError: module 'tensorflow' has no attribute 'placeholder'
Find professional answers about "AttributeError: module 'tensorflow' has no attribute 'placeholder'" in 365 Data Science's Q&A Hub.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found