diff --git a/mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc b/mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc index 2b267728a8..957f1f7ca6 100644 --- a/mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc +++ b/mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc @@ -1327,6 +1327,8 @@ std::vector AnfRuntimeAlgorithm::GetOutputMaxShape(const AnfNodePtr &anf_no } else if (shape->isa()) { auto shape_ptr = shape->cast(); return GetShapeFromSequeueShape(shape_ptr, index, kMaxShape); + } else if (shape->isa()) { + return {}; } else { MS_LOG(EXCEPTION) << "Invalid Shape Type"; } @@ -1342,6 +1344,8 @@ std::vector AnfRuntimeAlgorithm::GetOutputMinShape(const AnfNodePtr &anf_no } else if (shape->isa()) { auto shape_ptr = shape->cast(); return GetShapeFromSequeueShape(shape_ptr, index, kMinShape); + } else if (shape->isa()) { + return {}; } else { MS_LOG(EXCEPTION) << "Invalid Shape Type"; }