Turns StrongShape into generic shape.
| 441 | |
| 442 | // Turns StrongShape into generic shape. |
| 443 | Shape ToShape() const { |
| 444 | std::vector<int32_t> dimensions(StrongShape::size()); |
| 445 | for (int i = 0; i < StrongShape::size(); ++i) { |
| 446 | dimensions[i] = StrongShape::get(i); |
| 447 | } |
| 448 | return Shape(L, std::move(dimensions)); |
| 449 | } |
| 450 | |
| 451 | // @return all dimensions multiplied |
| 452 | int64_t DimensionsProduct() const { |