---
title: NodeOpTypeFeature构造函数和析构函数
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommercial/latest/Convergence/tfscopedevg/atlassfpapi_07_0164.html
sourcePath: /source/zh/TensorFlowCommercial/900/Convergence/tfscopedevg/atlassfpapi_07_0164.html
indexId: e6e1dbf85666daf6e7944f4c300eeb3016c41433ad04a4a4b18c92d2fbc27de684
---
# NodeOpTypeFeature构造函数和析构函数

#### 产品支持情况

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


#### 函数功能

NodeOpTypeFeature构造函数和析构函数。

继承ScopeBaseFeature。


#### 函数原型

数据类型为string的接口后续版本会废弃，建议使用数据类型为非string的接口。


```
NodeOpTypeFeature(std::string nodeType, int32_t num, int32_t step = 0);
NodeOpTypeFeature(const char_t *node_type, int32_t num, int32_t step = 0);
NodeOpTypeFeature(NodeOpTypeFeature const &feature);
NodeOpTypeFeature &operator=(NodeOpTypeFeature const &feature);
~NodeOpTypeFeature() override;
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| nodeType | 输入 | 算子类型 |
| node\_type | 输入 | 算子类型 |
| num | 输入 | 算子数量，算子个数为0时，num为\-1。 |
| step | 输入 | 步长，图中算子的倍数。 |
| feature | 输入 | NodeOpTypeFeature对象 |


#### 返回值

NodeOpTypeFeature构造函数返回NodeOpTypeFeature类型的对象。


#### 异常处理

无。


#### 约束说明

无。
