title: tensorflow import error: cannot import keras.layers
body: <p>I am trying to import keras using jupyternotebook but i get an error.</p>
  
  <p>in general, using tensorflow.keras.XX instead of keras.XX solves the problem but that is not the case for keras.layers . is there any other way to solve the problem?
  below is the code i wrote</p>
  
  <pre><code>import tensorflow as tf
  import tensorflow.keras
  from tensorflow.keras import backend as k
  from tensorflow.keras.models import Model, load_model, save_model
  from tensorflow.keras.layers import Input,Dropout,BatchNormalization,Activation,Add
  from keras.layers.core import Lambda
  from keras.layers.convolutional import Conv2D, Conv2DTranspose
  from keras.layers.pooling import MaxPooling2D
  from tensorflow.keras.layers.merge import concatenate
  from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau
  from tensorflow.keras import backend as K
  from tensorflow.keras import optimizers
  </code></pre>
  
  <p>and the below is the error i get</p>
  
  <pre><code>from tensorflow.keras.preprocessing.image import array_to_img, img_to_array, load_img#,save_img
  
  import time
  t_start = time.time()
  
  &lt;ipython-input-51-e901beac4908&gt; in &lt;module&gt;
        4 from tensorflow.keras.models import Model, load_model, save_model
        5 from tensorflow.keras.layers import Input,Dropout,BatchNormalization,Activation,Add
  ----&gt; 6 from keras.layers.core import Lambda
        7 from keras.layers.convolutional import Conv2D, Conv2DTranspose
        8 from keras.layers.pooling import MaxPooling2D
  
  /usr/local/lib/python3.5/dist-packages/keras/__init__.py in &lt;module&gt;
        1 from __future__ import absolute_import
        2 
  ----&gt; 3 from . import utils
        4 from . import activations
        5 from . import applications
  
  /usr/local/lib/python3.5/dist-packages/keras/utils/__init__.py in &lt;module&gt;
        4 from . import data_utils
        5 from . import io_utils
  ----&gt; 6 from . import conv_utils
        7 from . import losses_utils
        8 from . import metrics_utils
  
  /usr/local/lib/python3.5/dist-packages/keras/utils/conv_utils.py in &lt;module&gt;
        7 from six.moves import range
        8 import numpy as np
  ----&gt; 9 from .. import backend as K
       10 
       11 
  
  /usr/local/lib/python3.5/dist-packages/keras/backend/__init__.py in &lt;module&gt;
  ----&gt; 1 from .load_backend import epsilon
        2 from .load_backend import set_epsilon
        3 from .load_backend import floatx
        4 from .load_backend import set_floatx
        5 from .load_backend import cast_to_floatx
  
  /usr/local/lib/python3.5/dist-packages/keras/backend/load_backend.py in &lt;module&gt;
       88 elif _BACKEND == 'tensorflow':
       89     sys.stderr.write('Using TensorFlow backend.\n')
  ---&gt; 90     from .tensorflow_backend import *
       91 else:
       92     # Try and load external backend.
  
  /usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py in &lt;module&gt;
       52 
       53 # Private TF Keras utils
  ---&gt; 54 get_graph = tf_keras_backend.get_graph
       55 # learning_phase_scope = tf_keras_backend.learning_phase_scope  # TODO
       56 name_scope = tf.name_scope
  
  AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'
  </code></pre>