IsScalar
Function Usage
Determines whether a shape is a scalar, which means that GetDimNum() is 0.
Prototype
1 | bool IsScalar() const |
Parameters
None
Returns
true or false
Constraints
None
Examples
1 2 3 4 | Shape shape0({3, 256, 256}); Shape shape2; shape0.IsScalar(); // false shape2.IsScalar(); // true |
Parent topic: Shape