---
title: operator!=
description: "判断与另一个Shape对象是否不等。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00153.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00153.html
indexId: ab3cafdf0b2573dadd43600560bb2f02fb57572ee837418259c43cbab4d7a83078
---
# operator!=

#### 函数功能

判断与另一个Shape对象是否不等。


#### 函数原型

```
bool operator!=(const Shape &rht) const
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| rht | 输入 | 另一个Shape对象。 |


#### 返回值说明

true：不相等；false：相等。


#### 约束说明

无。


#### 调用示例

```
Shape shape0({3, 256, 256});
Shape shape1({1, 3, 256, 256});
auto is_diff_shape = shape0 != shape1; // 返回值为true，不相等
```
