From facdf77f84a79ef38e8732cf0d898b8ee6d61897 Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 30 May 2019 17:05:44 -0700 Subject: [PATCH] Fix shape inference bug in GatherND contrib op (#1132) --- onnxruntime/core/graph/contrib_ops/contrib_defs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc index 2d092dd322..65f2cb4725 100644 --- a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc +++ b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc @@ -929,7 +929,7 @@ with the exception that numpy default keepdims to False instead of True.)DOC") .TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) { propagateElemTypeFromInputToOutput(ctx, 0, 0); if (!hasNInputShapes(ctx, 2)) { - fail_shape_inference("GatherND requires two tensor inputs."); + return; } auto& data_shape = ctx.getInputType(0)->tensor_type().shape(); auto& indices_shape = ctx.getInputType(1)->tensor_type().shape();