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 29.
The error is not easy to track. If you have any ideas, I would appreciated it.