判断与另外一个shape对象是否相等,如果两个shape的dim num相等,并且dim num内每个dim的值都相等,则认为两个shape相等。
bool operator==(const Shape &rht) const
true:相等。
false:不相等。
无
Shape shape0({3, 256, 256}); Shape shape1({1, 3, 256, 256}); auto is_same_shape = shape0 == shape1; // 返回值为false,不相等