Context

TensorFlow 2.6 provides the compat module to help with compatibility. The compat.v1 module is used to provide TF1 API compatibility. In other words, it allows you to use deprecated TF1 APIs in TF2.

There may be TensorFlow 2.6 scripts that call TF1 APIs using tf.compat.v1 to control script execution in session mode (Estimator/Session/Keras) used in TF1. Such training scripts can be ported to Ascend AI Processor, and the porting points are basically the same as those of TF1.