如果在执行本教程中的代码时遇到此错误
https://pixellib.readthedocs.io/en/latest/image_ade20k.html
ValueError: You are trying to load a weight file containing 293 layers into a model with 147 layers
如果在执行本教程中的代码时遇到此错误
https://pixellib.readthedocs.io/en/latest/image_ade20k.html
ValueError: You are trying to load a weight file containing 293 layers into a model with 147 layers
2条答案
按热度按时间kuhbmx9i1#
hgtggwj02#
我通过在pixellib/semantic/deeplab.py中更改一些导入来使它工作。
您可以将所有导入
tensorflow.python.keras
替换为tensorflow.keras
,但from tensorflow.python.keras.utils.layer_utils import get_source_inputs
除外。