---
title: SetOriginFormat
description: "向TensorDesc中设置Tensor的原始Format。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00448.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00448.html
indexId: dca8c55dfd2dafdeb0bde661b38fe0c485900e08fa8cf0cab0e2f2ef09185fc278
---
# SetOriginFormat

#### 函数功能

向TensorDesc中设置Tensor的原始Format。

该Format是指原始网络模型的Format。


#### 函数原型

```
void SetOriginFormat(Format origin_format)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| origin\_format | 输入 | 需设置的原始Format信息。 关于Format数据类型的定义，请参见Format。 |


#### 返回值

无。


#### 异常处理

无。


#### 约束说明

无。
