ele*_*ora 11 python ubuntu machine-learning keras tensorflow
我想第一次运行keras.我安装了以下模块:
pip install keras --user
pip install tensorflow --user
Run Code Online (Sandbox Code Playgroud)
然后尝试运行https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py.
但它给了我:
AttributeError: 'module' object has no attribute 'control_flow_ops'
Run Code Online (Sandbox Code Playgroud)
这些是我正在使用的版本.
print tensorflow.__version__
0.11.0rc0
print keras.__version__
1.1.0
Run Code Online (Sandbox Code Playgroud)
我能做些什么才能让keras与tensorflow一起运行?
Dee*_*rma 23
Keras和TF之间存在问题,可能tf.python.control_flow_ops不存在或不再可见.使用下面的import语句可以解决此问题
import tensorflow as tf
tf.python.control_flow_ops = tf
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请访问:https: //github.com/fchollet/keras/issues/3857
归档时间: |
|
查看次数: |
17351 次 |
最近记录: |