qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.77k stars 1.03k forks source link

Import Error in Google Colab #490

Open antaripg opened 3 years ago

antaripg commented 3 years ago

When I am trying to import segmentation models in google colab after completing the installation of the segmentation model in the colab notebook. It throws the following error :

"ImportError: cannot import name 'get_source_inputs' from 'keras.engine' (/usr/local/lib/python3.7/dist-packages/keras/engine/init.py)" Please help. Thanks in Advance.

syaxx0819 commented 3 years ago

maybe you can have a try in your loacl system using sm.set_framework('tf.keras') ,and then you can use the code sm.Unet() ,but i haven't solove the problem same as you ...

mehrdad-dev commented 3 years ago

look at this issue it's worked for me.

innat commented 3 years ago

Check this answer regarding your issue. Hope it helps.