Actually, this question already was asked by me but it didn't even get a single comment in 2 days. Maybe this is not much of a time and I am just impatience, but I think it would be good to re-ask this question on a forum with much bigger activity. So, my question is: I've trained a model to recognize some captchas and the model is doing great. I've trained it using this tutorial (actually I just stole the code, tweaked it and run ). Now, I'd like to export it and use in my C++ project with OpenCV. I've googled around and understood that I need to convert my model to something other than .keras model. Perhaps it should be ONNX, but it is not very clear to me how will it work, as the code I mentioned uses custom layer (CTCLayer), which required @keras.saving.register_keras_serializable() to be able to save it, but I cannot re-load the model even using TF without the class and its dependencies (loss function and stuff) present. Maybe I'm saving it wrong? Continue reading...