Learning Wizard

This section describes the intended audience, development process of a TensorFlow 2.6.5–based model, and precautions for using this document.

Intended Audience

This document is intended for AI algorithm engineers. It describes how to port a training script developed by TensorFlow 2.6.5 Python APIs to the Ascend AI Processor to execute training, and debug and optimize the accuracy and performance.

To better understand this document, you are supposed to:
  • Be familiar with the basic CANN architecture and features.
  • Be familiar with TensorFlow APIs.
  • Possess knowledge of machine learning and deep learning, especially network training basics.
  • Be proficient in Python programming.

Supported Product

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Precautions

  • Before porting a model to the Ascend AI Processor, prepare a model developed in TensorFlow 2.6.5 and the dataset, and ensure that the model runs normally on the GPU or CPU and meet the accuracy and performance requirements. In addition, record the accuracy and performance results for later comparison with those on the Ascend AI Processor.
  • The code snippets in this document are only examples. Manual tweaking is needed.

Model Development Process

The model development aims to port the original TensorFlow-based model to the Ascend AI Processor and start training. The process is as follows.

Figure 1 Model development process

Porting Modes

You have the two options for porting your training script developed based on the TensorFlow Python API to the Ascend AI Processor:

  • Automated porting

    Algorithm engineers can use the porting tool to analyze the support for the TensorFlow Python API on the Ascend AI Processor, and automatically port native TensorFlow training scripts to those supported by the Ascend AI Processor. For APIs unportable by the tool, modify your training scripts according to the tool report.

  • Manual porting

    Algorithm engineers can modify TensorFlow training scripts to adapt them to the Ascend AI Processor. This method is more complex. The more friendly automated porting mode is recommended.

Related Courses

You can click here to view online video courses on porting and training processes of a TensorFlow 2.6.5–based model.