Keras + tensorflow gives the error "no attribute 'control_flow_ops'"
<p>I am trying to run keras for the first time.  I installed the modules with:</p>

<pre><code>pip install keras --user
pip install tensorflow --user
</code></pre>

<p>and then tried to run <a href="https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py" rel="nofollow">https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py</a>.</p>

<p>However it gives me:</p>

<pre><code>AttributeError: 'module' object has no attribute 'control_flow_ops'
</code></pre>

<p>These are the versions I am using.</p>

<pre><code>print tensorflow.__version__
0.11.0rc0
print keras.__version__
1.1.0
</code></pre>

<blockquote>
  <p>What can I do to get keras to run with tensorflow?</p>
</blockquote>

<p>There is an issue between Keras and TF, Probably tf.python.control_flow_ops does not exist or not visible anymore.
 using below import statements you can resolve this issue</p>

<p>import tensorflow as tf</p>

<p>tf.python.control_flow_ops = tf</p>

<p>For Details check:
<a href="https://github.com/fchollet/keras/issues/3857" rel="nofollow">https://github.com/fchollet/keras/issues/3857</a></p>

python ubuntu machine-learning tensorflow keras