Context

TensorFlow 2.6.5 provides the compat.v1 module to enable TensorFlow 1.x API compatibility. In other words, you can use deprecated TensorFlow 1.x APIs in TensorFlow 2.6.5.

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