conx
conx copied to clipboard
Keras Optimizer TFOptimizer
Hello,
I just installed conx and my tensorflow version is 2.4.0.
When I try to import conx with import conx as cx, I get the follow error message.
ImportError Traceback (most recent call last)
2 frames
/usr/local/lib/python3.6/dist-packages/conx/layers.py in
ImportError: cannot import name 'TFOptimizer'
Is there anyway to fix this?
Conx was written for tf 1. So, you could down-grade tf. But we're also going to redo conx in the next few weeks to work with a more modern tf.
Thank you very much for your help.
I was trying to run the code in this notebook: https://nbviewer.jupyter.org/github/Calysto/conx-notebooks/blob/master/work-in-progress/AlphaZero.ipynb
I was initially running tensorflow 1 but then "from keras import regularizers" throws up an error to install tensorflow 2 version.
I look forward to conx that works with tensorflow 2. In the meantime, I'll see if regularizers can be replaced with something else.
Happy Holidays.
The full error when I try to import conx without tensorflow version 2 is:
ModuleNotFoundError Traceback (most recent call last)
/anaconda3/envs/rl/lib/python3.7/site-packages/keras/init.py in
ModuleNotFoundError: No module named 'tensorflow'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
/anaconda3/envs/rl/lib/python3.7/site-packages/conx/init.py in
/anaconda3/envs/rl/lib/python3.7/site-packages/conx/network.py in
/anaconda3/envs/rl/lib/python3.7/site-packages/keras/init.py in pip install tensorflow
')
8
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow