mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 21:22:43 -06:00
Before opset 13, Hardmax groups every trailing dimension from the selected axis into one reduction. The importer currently applies the modern single-axis rule. Share the existing opset and default-axis handling with Softmax and pass the flattened-tail mode through to the Hardmax layer. A rank-three input with shape [2,2,3] and axis 1 should produce two ones, one per flattened row. Added a DNN accuracy regression and checked legacy and modern ONNX graphs on the CPU backend.