When I run the first part of the demo, I get the following error:
Traceback (most recent call last):
File "demo.py", line 16, in
import mrcnn.model as modellib
File "/data/harryyhw/Mask_RCNN/mrcnn/model.py", line 31, in
assert LooseVersion(tf.__version__) >= LooseVersion("1.3")
AttributeError: module 'tensorflow' has no attribute '__version__'
How do I fix this?
try change tf.version to tf.__version__ in the model.py code
it is __version__ in the code, sorry! my previous post didn't show this because the underscores were treated as formatting by GitHub.
you might have tried to uninstall and install tensorflow. There are chances of the environment using 2 kinds of tensorflows. Try creating a new environment and start fresh it would work. And never place with the tensorflow versions again.
@preethamsridhar is right. at least in my case that was the root cause of this error.
Most helpful comment
you might have tried to uninstall and install tensorflow. There are chances of the environment using 2 kinds of tensorflows. Try creating a new environment and start fresh it would work. And never place with the tensorflow versions again.