Solution:
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')
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:Keras读取保存的模型时, 产生错误[ValueError: Unknown activation function:relu6] - Python技术站