Keras load saved model: SystemError: unknown opcode

人走茶凉 提交于 2021-01-25 16:59:30

问题


if I load a model which was saved to a tf saved model file I get the following issue. (keras 2.0)

SystemError: unknown opcode

As I can find this has to do with a lambda layer in my model.

https://github.com/keras-team/keras/issues/9595

There was stated the solution to save the architecure and weights.

Keep the code around and just save the weights. As you said:

save the architecture as code, and the weights in an h5. This will be compatible across versions

But how do I do that?

How do I save the model with a lambda layer savely now?

Thanks!

来源:https://stackoverflow.com/questions/63937724/keras-load-saved-model-systemerror-unknown-opcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!