判断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_same_shape = shape0 == shape1; // false