---
title: 简介
description: "可设置、获取相应对象的形状和数据类型。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0617.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0617.html
indexId: d0c54cc168a88b874d07c760db789723ee7e8881f7a9cb4f473730c68a5e754372
---
# 简介

可设置、获取相应对象的形状和数据类型。

#### 需要包含的头文件

```
#include <graph/inference_context.h>
```


#### Public成员函数

```
ShapeAndType()
~
ShapeAndType()
ShapeAndType(const Shape &shape, DataType data_type)
void SetShape(const Shape &shape)
const Shape &GetShape() const
void SetType(DataType data_type)
DataType GetDataType() const
```
