We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用savedmodel是因为要后续准备冻结模型。 函数用的tf.keras.model.save_model()和tf.keras.model.load_model() 分析了一下,是因为模型中包含了自定义的Lambda层,所以报错了, 对于lambda层我准备转为tf.function, 应该可以解决问题, 您有什么好的建议吗
The text was updated successfully, but these errors were encountered:
我没有试过其实…
Sorry, something went wrong.
请问你解决这个问题了么?
解决了,因为把loss当做自定义的lambda层也放进网络里了,这样训练时网络的输出就是loss,比较简洁,你可以仔细看训练模型的代码,但这个lambda层是不支持savedmodel格式的。 解决办法:可以建一个不包括自定义loss层的模型,然后将训练好的weight load进去,再savedmodel保存
,可以在预测的时候……save
No branches or pull requests
使用savedmodel是因为要后续准备冻结模型。
函数用的tf.keras.model.save_model()和tf.keras.model.load_model()
分析了一下,是因为模型中包含了自定义的Lambda层,所以报错了,
对于lambda层我准备转为tf.function, 应该可以解决问题,
您有什么好的建议吗
The text was updated successfully, but these errors were encountered: