Migrating TF 2 Model to TF 1 for inference


As I noticed, TF 2 is not backward compatible with TF 1. I developed my model in TF 2.6 but I am not able to import the saved_model.pb or even my json file to TF 1 for inference. Does anyone have the same issue?

Hi, have you tried:

tf.compat.v2.saved_model.load(...) (TF 1.x):

cc @markdaoust

Can I ask why? It seems strange to develope on TF2 and run on TF1.
Can you upgrade your inference platform to TF2, and then use tf.compat.v1 and disable_v2_behavior?