From ade32982b7fcbbc53a553e9f1611330626a0b347 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Dec 2020 10:19:07 +0800 Subject: [PATCH] Reset shape_range when input is -1. --- ge/generator/ge_generator.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ge/generator/ge_generator.cc b/ge/generator/ge_generator.cc index acb029e9..c775c477 100644 --- a/ge/generator/ge_generator.cc +++ b/ge/generator/ge_generator.cc @@ -272,6 +272,7 @@ static void ResetTensorVecShape(const vector &inputs, vector std::vector dynamic_shape_dims = {kDynamicDimValue}; GeShape dynamic_shape(dynamic_shape_dims); + std::vector> dynamic_shape_range; ge::GeTensor inputTensor; ge::GeTensorDesc desc(input_desc); @@ -280,6 +281,7 @@ static void ResetTensorVecShape(const vector &inputs, vector (void)AttrUtils::GetBool(input_desc, CONST_ATTR_NAME_INPUT, is_const); if (!is_const && shape_ori.GetDims().size() > 0) { desc.SetShape(dynamic_shape); + desc.SetShapeRange(dynamic_shape_range); } inputTensor.SetTensorDesc(desc);