File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,9 @@ inline void multidirectionalBroadcastShapeInference(
388388 resultShape.add_dim ()->set_dim_value (dim_value);
389389 } else if (num_symbolic_dims == 1 ) {
390390 *resultShape.add_dim () = symbolic_dim;
391- }
391+ } else {
392+ resultShape.add_dim ();
393+ }
392394 }
393395}
394396
Original file line number Diff line number Diff line change @@ -300,7 +300,10 @@ ONNX_OPERATOR_SET_SCHEMA(
300300 fail_shape_inference (" Required attribute axis is missing" );
301301 }
302302 int axis = static_cast <int >(axisAttr->i ());
303- if (axis < 0 || rank <= axis) {
303+ if (rank <= axis) {
304+ fail_shape_inference (" rank must be greater than axis" );
305+ }
306+ if (axis < 0 ) {
304307 return ; // TODO: check if negative axis must be supported
305308 }
306309
You can’t perform that action at this time.
0 commit comments