You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would like to use python 3.8 and Tensorflow 2+ for neuroner model. Is it supported?
I found out with Python 3.8.10 and TF 2.5.0
I get the error:
from neuroner import neuromodel
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/clem/penv/dsexp/lib/python3.8/site-packages/neuroner/neuromodel.py", line 20, in <module>
from tensorflow.contrib.tensorboard.plugins import projector
ModuleNotFoundError: No module named 'tensorflow.contrib'
>>>
This is because (damned) TF programmers are cavalier about backwards compatibility... The entire module tf.contrib has disappeared...
However, the fix is easy. In the file neuromodel.py
replace
from tensorflow.contrib.tensorboard.plugins import projector
with
try:
from tensorflow.contrib.tensorboard.plugins import projector # for TF 1.0
except ModuleNotFoundError:
from tensorboard.plugins import projector # for TF 2.0
[added]
It turns out there are a number of incompatibilities between TF 1.x and TF 2.x and it's a bit of work to find and fix them all...
Would like to use python 3.8 and Tensorflow 2+ for neuroner model. Is it supported?
The text was updated successfully, but these errors were encountered: