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?

Mojo Jojo
  • 369
  • 3
  • 11
  • 31
  • 1
    can you do `import tensorflow` and `import inspect` and see what's the output of `inspect.getsourcefile(tensorflow)` – Yaroslav Bulatov Jan 04 '17 at 23:15
  • /home/mojo/.local/lib/python2.7/site-packages/tensorflow/__init__.py – Mojo Jojo Jan 04 '17 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? – mrry Jan 05 '17 at 01: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 – Mojo Jojo Jan 05 '17 at 03:16
  • [AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'](https://stackoverflow.com/a/51120550/6521116) – LF00 Jul 01 '18 at 05:04

0 Answers0