Unexpected behavior with ONNX model when read from OpenCV DNN module (Java)

which, exactly (there are about 10 different) ?
what are you trying to infer from it ?
(classes ? segments ? boxes ?)
opencv version ?

that’s expected / on purpose.
rows/cols only make sense with 2d Mats, you got a 4d tensor here, use:

output.dims() // -> 4 ?
output.size(0); // 1,2,3

to retrieve actual dimensions