UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xcf in position 15: invalid start byte

       在使用tf.keras.models.load_model加载模型时出现该错误,尝试了很多办法,最终找到了解决办法!

解决方法:

路径中不能含有中文!!!

model = tf.keras.models.load_model('D:\\student\\shicishengcheng\\best_model.h5')

成功输出!

猜你喜欢

转载自blog.csdn.net/weixin_45972980/article/details/134588666