Frozen graph is deprecated in TF2. Using Saved model is the new approach. Instead of creating a configuration file and using bazel
in steps 1 and 2 described here, simply use the saved_model_cli
. The final compilation step of creating a binary can be performed using a makefile
instead of bazel
.
- Create a TF saved_model using
tf.saved_model.save
. - Use the
saved_model_cli
to perform XLA AOT compilation.
saved_model_cli aot_compile_cpu \
--dir resnet/1 \
--tag_set serve \
--signature_def_key serving_default \