TypeError: 'encoding' is an Unexpected Keyword Argument in TensorFlow's load_model Function
The error message indicates that the load_model function in TensorFlow does not accept the encoding parameter.
The load_model function in TensorFlow does not have an encoding parameter. You should remove the encoding='utf-8' argument from the function call:
model = tf.keras.models.load_model('model.h5', compile=False, custom_objects={'<custom_objects>'})
This should resolve the TypeError and allow you to load the model successfully.
原文地址: http://www.cveoy.top/t/topic/pghA 著作权归作者所有。请勿转载和采集!