---
title: 简介
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommercial/latest/migration/tfmigr1/tfmigr1_tfadapi_0003.html
sourcePath: /source/zh/TensorFlowCommercial/900/migration/tfmigr1/tfmigr1_tfadapi_0003.html
indexId: aa3358ef8894b5bbcd6fde8a2c66f5d9feec91d34780c053277336fff2362c3779
---
# 简介

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | ☓ |
| Atlas 推理系列产品 | ☓ |
| Atlas 训练系列产品 | √ |


#### 功能说明

TF Adapter提供了系列session配置用于进行功能调试、性能提升、精度提升等，开发者在AI处理器上进行模型训练或在线推理时，可以使用这些session配置。

您可以在TensorFlow Adapter软件安装路径下的：python/site-packages/npu_bridge/estimator/npu/npu_estimator.py文件中查看相关配置定义，如果相关参数本章节未列出，表示该参数预留或适用于其他AI处理器版本，用户无需关注。


#### 调用示例

session配置的通用使用方式如下所示：

```
import tensorflow as tf
from npu_bridge.npu_init import *
config = tf.ConfigProto()
custom_op = config.graph_options.rewrite_options.custom_optimizers.add()
custom_op.name = "NpuOptimizer"
custom_op.parameter_map["use_off_line"].b = True
config.graph_options.rewrite_options.remapping = RewriterConfig.OFF
config.graph_options.rewrite_options.memory_optimization = RewriterConfig.OFF
with tf.Session(config=config) as sess:
    sess.run(cost)
```

使用迁移工具自动迁移后的脚本，如果需要通过session配置使能相关功能，session配置的添加方法可参见后续处理（可选）。
