Keras ValueError: Unknown activation function:relu6

需要添加一些额外的代码,方式如下:

from keras.utils.generic_utils import CustomObjectScope
 
with CustomObjectScope({'relu6': keras.applications.mobilenet.relu6,'DepthwiseConv2D': keras.applications.mobilenet.DepthwiseConv2D}):
    model = load_model('model_saved.hdf5')
发布了74 篇原创文章 · 获赞 47 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_40639095/article/details/103452482