---
title: operator!=
description: "判断shape是否不相等。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00181.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00181.html
indexId: 5f9c44312bfa89036ccf113349c1092816b51d5df11ab5ae1cc589b0ea32a3f978
---
# operator!=

#### 函数功能

判断shape是否不相等。


#### 函数原型

```
bool operator!=(const StorageShape &other) const
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| other | 输入 | 另一个shape。 |


#### 返回值说明

true：不相等；false：相等。


#### 约束说明

无。


#### 调用示例

```
StorageShape shape0({3, 256, 256}, {256, 256, 3});
StorageShape shape1({3, 256, 256}, {3, 256, 256});
bool is_diff_shape = shape0 != shape1; // true
```
