Saved_model key error in function_serialization

KeyError: "Failed to add concrete function b’__inference_train_14141’ to object based saved model as it captures tf.Tensor(, shape=(), dtype=resource) tensor.

Details are in KeyError: "Failed to add concrete function b'__inference_train_14141' to object based saved model as it captures tf.Tensor(<unprintable>, shape=(), dtype=resource) tensor · Issue #51587 · tensorflow/tensorflow · GitHub.

The error is not easy to track. If you have any ideas, I would appreciated it.

1 Like

Hi @Qiqin_Zhan

As there is no reproducible code present in the issue description, It’s hard to replicate the error and to understand the issue. However, could you please try replicating the code using latest TensorFlow version as mentioned in the comments of linked Github issue and let us know if the issue still persists. Thank you.