From 890fd9b395b3bc6dbd59b6617efc24778ecfdc62 Mon Sep 17 00:00:00 2001 From: bsx <2980708493@qq.com> Date: Tue, 11 Jan 2022 20:00:31 +0800 Subject: [PATCH] [fix][assistant][I48OB7] Modify the logic error in infershape --- mindspore/core/ops/apply_centered_rms_prop.cc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mindspore/core/ops/apply_centered_rms_prop.cc b/mindspore/core/ops/apply_centered_rms_prop.cc index f62b20d16be..3950645411a 100644 --- a/mindspore/core/ops/apply_centered_rms_prop.cc +++ b/mindspore/core/ops/apply_centered_rms_prop.cc @@ -38,10 +38,6 @@ abstract::ShapePtr ApplyCenteredRMSPropInferShape(const PrimitivePtr &primitive, auto ms_shape_ptr = ms_shape->cast(); auto mom_shape_ptr = mom_shape->cast(); auto grad_shape_ptr = grad_shape->cast(); - auto lr_shape_map = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[5]->GetShapeTrack()); - auto decay_shape_map = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[6]->GetShapeTrack()); - auto momentum_shape_map = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[7]->GetShapeTrack()); - auto epsilon_shape_map = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[8]->GetShapeTrack()); // var and mg must have the same shape when is not dynamic if (!var_shape_ptr->IsDynamic() && !mg_shape_ptr->IsDynamic()) { if (*var_shape != *mg_shape) { @@ -70,14 +66,6 @@ abstract::ShapePtr ApplyCenteredRMSPropInferShape(const PrimitivePtr &primitive, << " are not consistent with var shape " << var_shape->ToString(); } } - const int64_t kShapeSize = 0; - (void)CheckAndConvertUtils::CheckInteger("lr_shape size", lr_shape_map[kShape].size(), kEqual, kShapeSize, op_name); - (void)CheckAndConvertUtils::CheckInteger("decay_shape size", decay_shape_map[kShape].size(), kEqual, kShapeSize, - op_name); - (void)CheckAndConvertUtils::CheckInteger("momentum_shape size", momentum_shape_map[kShape].size(), kEqual, kShapeSize, - op_name); - (void)CheckAndConvertUtils::CheckInteger("epsilon_shape size", epsilon_shape_map[kShape].size(), kEqual, kShapeSize, - op_name); auto shape_element = var_shape->cast(); MS_EXCEPTION_IF_NULL(shape_element); return shape_element;