Enabling the graph mode in TensorFlow
The TensorFlow 1.15 network uses the graph mode. In this version, the TF Adapter can be used to connect to the GE graph engine and the Ascend hardware is used for acceleration.
The TensorFlow 2.6.5 network is in eager mode (single-operator mode) by default. That is, each operator is executed and returned immediately after being delivered. To improve execution performance, TensorFlow 2.6.5 provides the tf.function decorator, which can encapsulate the TensorFlow operations called in Python functions into computational graphs and execute the graphs in graph mode. For TensorFlow 2.6.5, the Ascend platform supports only the execution in graph mode. That is, only the functions modified by tf.function can be executed in Ascend for hardware acceleration.
The following figure shows the software architecture for executing the TensorFlow-based network in graph mode on the Ascend platform.

The TensorFlow frontend uses the TF Adapter to convert the frontend TensorFlow model into a GE graph. GE compiles and optimizes the computational graph, and delivers the graph to the Ascend hardware for execution.
For details about how to migrate the original TensorFlow network to the Ascend platform for TensorFlow 1.15, see TensorFlow 1.15 Model Porting Guide.
For details about how to migrate the original TensorFlow network to the Ascend platform for TensorFlow 2.6.5, see TensorFlow 2.6.5 Model Porting Guide.