2

While using U-Net in tensorflow, using the command: net = unet.Unet(nx=128, ny=128, layers=3, features_root=64, channels=1, n_class=2) gives attribute error AttributeError: 'module' object has no attribute 'reset_default_graph' . There is no tensorflow.py file which is being imported by default as in few similar issues I came across.

How can I fix this?

5
  • 1
    can you do import tensorflow and import inspect and see what's the output of inspect.getsourcefile(tensorflow) Commented Jan 4, 2017 at 23:15
  • /home/mojo/.local/lib/python2.7/site-packages/tensorflow/__init__.py Commented Jan 4, 2017 at 23:44
  • Perhaps the issue is in the unet module? If you add the code that Yaroslav suggested to the file containing the unet.Unet implementation, do you get a different result? Commented Jan 5, 2017 at 1:18
  • Yes the result is different and is /home/mojo/.local/lib/python2.7/site-packages/tf_unet-0.1.0-py2.7.egg/tf_unet/unet.py Commented Jan 5, 2017 at 3:16
  • AttributeError: module 'tensorflow' has no attribute 'reset_default_graph' Commented Jul 1, 2018 at 5:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.