aboutsummaryrefslogtreecommitdiff
path: root/ConversionUtils_1_2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ConversionUtils_1_2.hpp')
-rw-r--r--ConversionUtils_1_2.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/ConversionUtils_1_2.hpp b/ConversionUtils_1_2.hpp
index 080b8264..cddb13d7 100644
--- a/ConversionUtils_1_2.hpp
+++ b/ConversionUtils_1_2.hpp
@@ -653,11 +653,6 @@ bool ConvertExpandDims(const HalOperation& operation, const HalModel& model, Con
return Fail("%s: %s", __func__, e.what());
}
- if (targetShape != outputInfo.GetShape())
- {
- return Fail("%s: Shape of the output operand does not match the resolved expanded shape", __func__);
- }
-
ReshapeDescriptor reshapeDescriptor;
reshapeDescriptor.m_TargetShape = targetShape;
@@ -675,6 +670,10 @@ bool ConvertExpandDims(const HalOperation& operation, const HalModel& model, Con
if(!IsDynamicTensor(outputInfo))
{
+ if (targetShape != outputInfo.GetShape())
+ {
+ return Fail("%s: Shape of the output operand does not match the resolved expanded shape", __func__);
+ }
validateFunc(outputInfo, isSupported);
}
else