title: how to solve an issue using segmentation-models library
body: <p>I installed segmentation-models library using pip as the provided instruction</p>
  <p><a href="https://segmentation-models.readthedocs.io/en/latest/tutorial.html" rel="nofollow noreferrer">enter link description here</a></p>
  <p>. this is what I got after importing it:</p>
  <pre><code>from segmentation_models import Unet
  model = Unet()
  </code></pre>
  <p>This is the error I got:</p>
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-38-4835d2c1eebe&gt; in &lt;module&gt;
        3 from segmentation_models import Unet
        4 
  ----&gt; 5 model = Unet()
  
  ~\Anaconda3\lib\site-packages\segmentation_models\__init__.py in wrapper(*args, **kwargs)
       32         kwargs['models'] = _KERAS_MODELS
       33         kwargs['utils'] = _KERAS_UTILS
  ---&gt; 34         return func(*args, **kwargs)
       35 
       36     return wrapper
  
  ~\Anaconda3\lib\site-packages\segmentation_models\models\unet.py in Unet(backbone_name, input_shape, classes, activation, weights, encoder_weights, encoder_freeze, encoder_features, decoder_block_type, decoder_filters, decoder_use_batchnorm, **kwargs)
      224         weights=encoder_weights,
      225         include_top=False,
  --&gt; 226         **kwargs,
      227     )
      228 
  
  ~\Anaconda3\lib\site-packages\segmentation_models\backbones\backbones_factory.py in get_backbone(self, name, *args, **kwargs)
      101     def get_backbone(self, name, *args, **kwargs):
      102         model_fn, _ = self.get(name)
  --&gt; 103         model = model_fn(*args, **kwargs)
      104         return model
      105 
  
  ~\Anaconda3\lib\site-packages\classification_models\models_factory.py in wrapper(*args, **kwargs)
       76             modules_kwargs = self.get_kwargs()
       77             new_kwargs = dict(list(kwargs.items()) + list(modules_kwargs.items()))
  ---&gt; 78             return func(*args, **new_kwargs)
       79 
       80         return wrapper
  
  ~\Anaconda3\lib\site-packages\keras_applications\vgg16.py in VGG16(include_top, weights, input_tensor, input_shape, pooling, classes, **kwargs)
      100 
      101     if input_tensor is None:
  --&gt; 102         img_input = layers.Input(shape=input_shape)
      103     else:
      104         if not backend.is_keras_tensor(input_tensor):
  
  ~\Anaconda3\lib\site-packages\keras\engine\input_layer.py in Input(shape, batch_shape, name, dtype, sparse, tensor)
      176                              name=name, dtype=dtype,
      177                              sparse=sparse,
  --&gt; 178                              input_tensor=tensor)
      179     # Return tensor including _keras_shape and _keras_history.
      180     # Note that in this case train_output and test_output are the same pointer.
  
  ~\Anaconda3\lib\site-packages\keras\legacy\interfaces.py in wrapper(*args, **kwargs)
       89                 warnings.warn('Update your `' + object_name + '` call to the ' +
       90                               'Keras 2 API: ' + signature, stacklevel=2)
  ---&gt; 91             return func(*args, **kwargs)
       92         wrapper._original_function = func
       93         return wrapper
  
  ~\Anaconda3\lib\site-packages\keras\engine\input_layer.py in __init__(self, input_shape, batch_size, batch_input_shape, dtype, input_tensor, sparse, name)
       37         if not name:
       38             prefix = 'input'
  ---&gt; 39             name = prefix + '_' + str(K.get_uid(prefix))
       40         super(InputLayer, self).__init__(dtype=dtype, name=name)
       41 
  
  ~\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py in get_uid(prefix)
       72     &quot;&quot;&quot;
       73     global _GRAPH_UID_DICTS
  ---&gt; 74     graph = tf.get_default_graph()
       75     if graph not in _GRAPH_UID_DICTS:
       76         _GRAPH_UID_DICTS[graph] = defaultdict(int)
  
  AttributeError: module 'tensorflow' has no attribute 'get_default_graph'
  
  </code></pre>
  <p>I would be appreciated if someone can help me with how to fix it. I simply copy the code from the instruction, and all I found on the net was just the same. Should it be something wrong with installation?</p>