title: cannot import name 'get_config' from 'tensorflow.python.eager.context'?
body: <p>I'm trying to follow this repo's tutorial on colab<a href="https://github.com/divamgupta/image-segmentation-keras" rel="nofollow noreferrer">https://github.com/divamgupta/image-segmentation-keras</a></p>
  <p>but I'm getting this error again and again</p>
  <pre><code>cannot import name 'get_config' from 'tensorflow.python.eager.context' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py)
  </code></pre>
  <p>I googled it a lot so I found some solutions that solved same problems for them, like upgrade tensorflow version or using <code>from tensorflow import keras</code> instead of <code>import keras</code></p>
  <p>or add this code snippet</p>
  <pre><code>!pip install --upgrade tensorflow
  !pip install --upgrade tensorflow-gpu
  </code></pre>
  <p>But none of them worked!</p>
  <p>Full error codes are as follow</p>
  <pre><code>---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  &lt;ipython-input-10-5c4963dc4fff&gt; in &lt;module&gt;()
        1 from tensorflow import keras
        2 from tensorflow.keras.preprocessing import image
  ----&gt; 3 from keras_segmentation.models.unet import vgg_unet
        4 
        5 model = vgg_unet(n_classes=50 ,  input_height=320, input_width=640  )
  
  3 frames
  /usr/local/lib/python3.7/dist-packages/keras_segmentation/models/unet.py in &lt;module&gt;()
  ----&gt; 1 from keras.models import *
        2 from keras.layers import *
        3 
        4 from .config import IMAGE_ORDERING
        5 from .model_utils import get_segmentation_model
  
  /usr/local/lib/python3.7/dist-packages/keras/__init__.py in &lt;module&gt;()
       23 
       24 # See b/110718070#comment18 for more details about this import.
  ---&gt; 25 from keras import models
       26 
       27 from keras.engine.input_layer import Input
  
  /usr/local/lib/python3.7/dist-packages/keras/models.py in &lt;module&gt;()
       17 
       18 import tensorflow.compat.v2 as tf
  ---&gt; 19 from keras import backend
       20 from keras import metrics as metrics_module
       21 from keras import optimizer_v1
  
  /usr/local/lib/python3.7/dist-packages/keras/backend.py in &lt;module&gt;()
       35 from tensorflow.python.distribute import distribute_coordinator as dc
       36 from tensorflow.python.distribute import distribute_coordinator_context as dc_context
  ---&gt; 37 from tensorflow.python.eager.context import get_config
       38 from tensorflow.python.framework import config
       39 from keras import backend_config
  
  ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py)
  
  ---------------------------------------------------------------------------
  NOTE: If your import is failing due to a missing package, you can
  manually install dependencies using either !pip or !apt.
  
  To view examples of installing some common dependencies, click the
  &quot;Open Examples&quot; button below.
  ---------------------------------------------------------------------------
  </code></pre>
  <p>Full codes are as follow</p>
  <pre><code>!pip install keras-segmentation
  !pip install keras==2.4.3
  #!pip install tensorflow==2.4.1
  !pip install tensorflow==2.5.0
  !apt-get install -y libsm6 libxext6 libxrender-dev
  !pip install opencv-python
  
  !pip install --upgrade tensorflow
  !pip install --upgrade tensorflow-gpu
  
  ! wget https://github.com/divamgupta/datasets/releases/download/seg/dataset1.zip &amp;&amp; unzip dataset1.zip
  
  from tensorflow import keras
  from tensorflow.keras.preprocessing import image
  from keras_segmentation.models.unet import vgg_unet
  
  model = vgg_unet(n_classes=50 ,  input_height=320, input_width=640  )
  
  model.train(
      train_images =  &quot;dataset1/images_prepped_train/&quot;,
      train_annotations = &quot;dataset1/annotations_prepped_train/&quot;,
      checkpoints_path = &quot;/tmp/vgg_unet_1&quot; , epochs=5  
  )
  
  out = model.predict_segmentation(
      inp=&quot;dataset1/images_prepped_test/0016E5_07965.png&quot;,
      out_fname=&quot;/tmp/out.png&quot;
  )
  
  %matplotlib inline
  
  import matplotlib
  import matplotlib.pyplot as plt
  
  plt.imshow(out)
  
  from IPython.display import Image
  Image('/tmp/out.png')
  
  o = model.predict_segmentation(
      inp=&quot;dataset1/images_prepped_test/0016E5_07965.png&quot;,
      out_fname=&quot;/tmp/out.png&quot; , overlay_img=True, show_legends=True,
      class_names = [ &quot;Sky&quot;,    &quot;Building&quot;, &quot;Pole&quot;,&quot;Road&quot;,&quot;Pavement&quot;,&quot;Tree&quot;,&quot;SignSymbol&quot;, &quot;Fence&quot;, &quot;Car&quot;,&quot;Pedestrian&quot;, &quot;Bicyclist&quot;]
  
  )
  
  from IPython.display import Image
  Image('/tmp/out.png')
  </code></pre>
  <p>I would appreciate any of your help
  thanks in advance</p>