IsScalar
函数功能
判断本shape是否为标量,所谓标量,是指GetDimNum()为0。
函数原型
1 | bool IsScalar() const |
参数说明
无。
返回值说明
true/false。
约束说明
无。
调用示例
1 2 3 4 | Shape shape0({3, 256, 256}); Shape shape2; shape0.IsScalar(); // false shape2.IsScalar(); // true |
父主题: Shape
判断本shape是否为标量,所谓标量,是指GetDimNum()为0。
1 | bool IsScalar() const |
无。
true/false。
无。
1 2 3 4 | Shape shape0({3, 256, 256}); Shape shape2; shape0.IsScalar(); // false shape2.IsScalar(); // true |