小编Dro*_*dux的帖子

module 'keras.utils.generic_utils' has no attribute 'get_custom_objects' when importing segmentation_models

I am working on google colab with the segmentation_models library. It worked perfectly the first week using it, but now it seems that I can't import the library anymore. Here is the error message, when I execute import segmentation_models as sm :

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

<ipython-input-3-6f48ce46383f> in <module>
      1 import tensorflow as tf
----> 2 import segmentation_models as sm

            3 frames

/usr/local/lib/python3.8/dist-packages/efficientnet/__init__.py in init_keras_custom_objects()
     69     }
     70 
---> 71     keras.utils.generic_utils.get_custom_objects().update(custom_objects)
     72 
     73 

AttributeError: module 'keras.utils.generic_utils' has …
Run Code Online (Sandbox Code Playgroud)

python image-segmentation keras tensorflow

4
推荐指数
3
解决办法
1万
查看次数

标签 统计

image-segmentation ×1

keras ×1

python ×1

tensorflow ×1